This is the main namespace of the Global module, that contains the
Mapspace.global.Viewer class.
This viewer is able to show any type of info, switching from one type of data
to another following some rules. For example, this viewer can show ortho and
oblique imagery at the same time and at certain resolutions switch between ortho
data to oblique data and viceversa.
Actually the viewer is a container for the other types of viewers, so this module is dependent on the rest of the modules.
- Source:
- mapspace-global/bu.global.jsdoc
Classes
Namespaces
Type Definitions
-
ActionType
-
Types of actions that result in the application of new options in the viewer.
Name Value Mapspace.global.ActionType.INITIALIZE initialize Mapspace.global.ActionType.ORTHOINTERACTED orthointeracted Mapspace.global.ActionType.OBLIQUEINTERACTED obliqueinteracted Mapspace.global.ActionType.SYNC sync Mapspace.global.ActionType.MODECHANGE modechange Mapspace.global.ActionType.GEOLOCATION geolocation - Source:
- mapspace-global/enums.js
-
ViewerEventType
-
Type of events for a
Mapspace.global.Viewer.Name Value Description Mapspace.global.ViewerEventType.VIEWMODECHANGED change:viewmode The view mode has changed. Mapspace.global.ViewerEventType.SWIPELAYERCHANGED change:swipelayer The swipe layer has changed. Mapspace.global.ViewerEventType.VIEWERVISIBILITYCHANGED viewervisibilitychanged The visibility changed. Mapspace.global.ViewerEventType.IMAGEAVAILABILITYCHANGED imageavailabilitychanged The availability of images has changed. - Source:
- mapspace-global/enums.js
-
ViewerOptions
-
Options for
Mapspace.global.Viewer.- Source:
- mapspace-global/typedefs.js
Properties:
Name Type Description namestring | undefined The name of the viewer.
targetElement | string | undefined The DOM target element where this viewer will be appended.
outputprojectionstring | undefined The viewer output projection. The 'EPSG:code' string with the projection to use in any control linked to this viewer when showing coordinates.
debugmodeboolean | undefined If activate the debug mode or not. By default is false. This mode is only active when Mapspace.DEBUG global variable is set to true and the user has the required permissions. The mode shows several extra information on top of existing layers and offer a debug panel.
debuggridboolean | undefined If activate a debug grid or not. By default is false. This mode is only active when Mapspace.DEBUG global variable is set to true and the user has the required permissions. If debugmode is set to false then this mode is ignored. The mode shows the grid of tiles with IDs for the main tile layer.
timestring | undefined Time filter of the viewer. Valid time values are any string with pattern YYYYMMDD or with pattern YYYYMMDD-YYYYMMDD. First filters images before the date, and second filters images between the dates.
imageidstring | undefined Image ID to open on start if the mode to show in start is Oblique mode.
pixelCenterMapspace.Coordinate | undefined Center in pixels. Only used if imageid is set, if not it is ignored. You must ensure that center matches the world coordinates for this pixel and that it is correctly set or initialization of the viewer will produce wrong results.
centerMapspace.Coordinate | undefined The initial center for the view. The coordinate system for the center is always an EPSG:4326 LanLot. If the mode to show in start is Oblique mode and both a center and an imageid are provided, then the center will be used.
constrainRotationboolean | number | undefined Rotation constraint.
falsemeans no constraint.truemeans no constraint, but snap to zero near zero. A number constrains the rotation to that number of values. For example,4will constrain the rotation to 0, 90, 180, and 270 degrees. The default istrue.enableRotationboolean | undefined Enable rotation. Default is
true. Iffalsea rotation constraint that always sets the rotation to zero is used. TheconstrainRotationoption has no effect ifenableRotationisfalse.extentMapspace.Extent | undefined The extent that constrains the center, in other words, center cannot be set outside this extent. Default is
undefined.maxResolutionnumber | undefined The maximum resolution used to determine the resolution constraint. It is used together with
minResolution(ormaxZoom) andzoomFactor. If unspecified it is calculated in such a way that the projection's validity extent fits in a 256x256 px tile. If the projection is Spherical Mercator (the default) thenmaxResolutiondefaults to40075016.68557849 / 256 = 156543.03392804097.minResolutionnumber | undefined The minimum resolution used to determine the resolution constraint. It is used together with
maxResolution(orminZoom) andzoomFactor. If unspecified it is calculated assuming 29 zoom levels (with a factor of 2). If the projection is Spherical Mercator (the default) thenminResolutiondefaults to40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253.maxZoomnumber | undefined The maximum zoom level used to determine the resolution constraint. It is used together with
minZoom(ormaxResolution) andzoomFactor. Default is28. Note that ifminResolutionis also provided, it is given precedence overmaxZoom.minZoomnumber | undefined The minimum zoom level used to determine the resolution constraint. It is used together with
maxZoom(orminResolution) andzoomFactor. Default is0. Note that ifmaxResolutionis also provided, it is given precedence overminZoom.projectionstring | undefined The projection when in Ortho mode. Default is
EPSG:3857(Spherical Mercator).resolutionnumber | undefined The initial resolution for the view. The units are
projectionunits per pixel (e.g. meters per pixel). An alternative to setting this is to setzoom. Default isundefined, and layer sources will not be fetched if neither this norzoomare defined.resolutionsArray.<number> | undefined Resolutions to determine the resolution constraint. If set the
maxResolution,minResolution,minZoom,maxZoom, andzoomFactoroptions are ignored.rotationnumber | undefined The initial rotation for the view in decimal degrees (positive rotation clockwise). Default is
0.zoomnumber | undefined Only used if
resolutionis not defined. Zoom level used to calculate the initial resolution for the view. The initial resolution is determined using theol.View#constrainResolutionmethod.zoomFactornumber | undefined The zoom factor used to determine the resolution constraint. Default is
2.layersArray.<ol.layer.Base> | ol.Collection.<ol.layer.Base> | undefined Layers. If this is not defined, a viewer with no layers will be rendered. Note that layers are rendered in the order supplied, so if you want, for example, a vector layer to appear on top of a tile layer, it must come after the tile layer.
rotatorTypeMapspace.control.RotatorType | undefined The type of rotator control that must be used as default when a workspace is deserialized. By deafult is Mapspace.control.RotatorType.DEFAULTROTATOR.
pinboolean | undefined If add a pin icon in the center of the viewer when viewer is loaded first time. By default is false.
labelboolean | string | undefined If show a pin icon and a label in the center of the viewer when viewer is loaded first time. By default is false. If it is true then executes a reverse geocoding in the location and label is the address found. If it is a string then no reverse geocoding is executed and the label is the string.
-
ViewerProperty
-
Properties of a
Mapspace.global.Viewer.Name Value Mapspace.global.ViewerProperty.VIEWMODE viewmode Mapspace.global.ViewerProperty.SWIPELAYER swipelayer - Source:
- mapspace-global/enums.js