Namespace: street

Mapspace. street

This is the main namespace of the Street module, that contains the Mapspace.street.Viewer. This viewer shows 360 panoramic images captured with a car mounted rig and vector data overlapped using a 3D viewer.

Source:
mapspace-street/bu.street.jsdoc

Classes

DebugEvent
DOMEvent
FixedLevelEvent
GraphFinder
Image
ImagesManager
Viewer

Namespaces

action
controldef
movements

Type Definitions


AnnotationType

Type of the street annotation (point, polyline, polygon, text) for street viewers.

Name Value
Mapspace.street.AnnotationType.POINT Mapspace.AnnotationType.POINT,
Mapspace.street.AnnotationType.POLYLINE Mapspace.AnnotationType.POLYLINE,
Mapspace.street.AnnotationType.POLYGON Mapspace.AnnotationType.POLYGON,
Mapspace.street.AnnotationType.TEXT Mapspace.AnnotationType.TEXT
Source:
mapspace-street/enums.js

CameraParameters

Camera parameters. x, y and z are normally 0,0,0 because the camera is set in the origin, but in certain cases as in an animation or movement effect, camera position can temporarily change.

Properties:
Name Type Description
yaw number | undefined

Angle in +Y axis with zero in -Z direction [PI,-PI].

pitch number | undefined

Angle in +X axis [PI/2,-PI/2].

roll number | undefined

Angle in +Z axis. [PI/2,-PI/2]. It usually is zero.

fov number | undefined

Angle of view in degrees. [0,360.0].

x number | undefined

X position of the camera in scene coordinates. Always meters.

y number | undefined

Y position of the camera in scene coordinates. Always meters.

z number | undefined

Z position of the camera in scene coordinates. Always meters.

Source:
mapspace-street/typedefs.js

DebugEventType

Type of events for debugging.

Name Value Description
Mapspace.street.DebugEventType.DEBUGMESSAGECHANGED debugmessagechanged The debug message has changed
Source:
mapspace-street/enums.js

ImagesManagerEventType

Type of events for a Mapspace.street.ImagesManager.

Name Value Description
Mapspace.street.ImagesManagerEventType.IMAGEADDED imageadded Triggered when a new Image is loaded
Source:
mapspace-street/enums.js

Level

Level properties.

Properties:
Name Type Description
index number

zoom level index

size number

Size in pixels of each full image. For a cube panorama is the full size of each of six images that comprises the cube.

tileSize number

Size of tiles.

numTiles number

size / tileSize. Always an integer value.

Source:
mapspace-street/typedefs.js

MeasurementType

Type of the street measurement (point, segment length, length, elevation, vertical area) for street viewers.

Name Value
Mapspace.street.MeasurementType.POINT Mapspace.MeasurementType.POINT
Mapspace.street.MeasurementType.LENGTH Mapspace.MeasurementType.LENGTH
Mapspace.street.MeasurementType.POLYLENGTH Mapspace.MeasurementType.POLYLENGTH
Mapspace.street.MeasurementType.ELEVATION Mapspace.MeasurementType.ELEVATION
Mapspace.street.MeasurementType.AREA Mapspace.MeasurementType.AREA
Mapspace.street.MeasurementType.VERTICAL_AREA Mapspace.MeasurementType.VERTICAL_AREA
Mapspace.street.MeasurementType.HEIGHT Mapspace.MeasurementType.HEIGHT
Source:
mapspace-street/enums.js

Tile

Tile.

Properties:
Name Type Description
x number

X coordinate of the tile. Tiles start in zero and ranges from upper left corner tile to bottom right corner tile with X and Y increasing in that direction.

y number

Y coordinate of the tile. Tiles start in zero and ranges from upper left corner tile to bottom right corner tile with X and Y increasing in that direction.

z number

Z coordinate of the tile representing the zoom level. The first level is zero and is the one with the minimum number of tiles for each cubic face in the cubemap, usually only one tile.

face string

Tile face (b, d, f, l, r, u). Back, Down, Front, Left, Right or Up.

Source:
mapspace-street/typedefs.js

TransformType

Type of transformation between street coordinates and world coordinates.

Name Value Description
Mapspace.street.TransformType.TOSTREET2D WTS2D Transformation from world 2D coordinates to pixel street image coordinates.
Mapspace.street.TransformType.TOSTREET3D WTS3D Transformation from world 3D coordinates to pixel street image coordinates.
Mapspace.street.TransformType.TOWORLD STW Transformation from pixel street image coordinates at a given distance to world coordinates.
Mapspace.street.TransformType.TOWORLDDEPTHMAP STWDM Transformation from pixel street image coordinates to world coordinates using a depth map
Source:
mapspace-street/enums.js

ViewerEventType

Type of events of a Mapspace.street.Viewer.

Name Value Description
Mapspace.street.ViewerEventType.IMAGEIDCHANGED change:imageid The image id has changed.
Mapspace.street.ViewerEventType.ROLLCHANGED change:roll The roll has changed.
Mapspace.street.ViewerEventType.PITCHCHANGED change:pitch The pitch has changed.
Mapspace.street.ViewerEventType.YAWCHANGED change:yaw The yaw has changed.
Mapspace.street.ViewerEventType.FOVCHANGED change:fov The FOV has changed.
Mapspace.street.ViewerEventType.BRIGHTNESSCHANGED change:brightness The brightness has changed.
Mapspace.street.ViewerEventType.CONTRASTCHANGED change:contrast The contrast has changed.
Mapspace.street.ViewerEventType.LAYERCHANGED change:layer The street layer has changed.
Mapspace.street.ViewerEventType.MAXDISTANCECHANGED change:maxdistance The maximum distance has changed.
Mapspace.street.ViewerEventType.USEDEPTHMAPMCHANGED change:usedepthmapm The use of depth map in measurements has changed.
Mapspace.street.ViewerEventType.USEDEPTHMAPACHANGED change:usedepthmapa The use of depth map in annotations has changed.
Mapspace.street.ViewerEventType.CUBICPANORAMAADDED cubicpanoramaadded Triggered when a new cubic panorama is added to the scene
Mapspace.street.ViewerEventType.IMAGEOPENED imageopened When a street image finishes the opening
Mapspace.street.ViewerEventType.DEPTHMAPCHANGED depthmapchanged The depth map visibility has changed
Source:
mapspace-street/enums.js

ViewerOptions

Options for Mapspace.street.Viewer.

Properties:
Name Type Description
name string | undefined

The name of the viewer.

target Element | string | undefined

The DOM target element where this viewer will be appended.

outputprojection string | undefined

The viewer output projection. The 'EPSG:code' string with the projection to use in any control linked to this viewer when showing coordinates.

debugmode boolean | 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.

debuggrid boolean | undefined

If activate a debug grid or not. Bay 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.

time string | 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.

layer string | undefined

Filter for sets of images when requesting for panoramas.

imageid string | undefined

Image ID to open on start.

center Mapspace.Coordinate | undefined

Center to use on start. If both a center and an iamgeid are provided, then the center will be used.

rotation number | undefined

Resolution on start.

fov number | undefined

FOV on start.

pitch number | undefined

Pitch on start.

yaw number | undefined

Yaw on start.

roll number | undefined

Roll on start. See Mapspace.street.Viewer#getRoll.

autorotate number | undefined

Time in milliseconds to wait to start an autorotateTimeout movement if no other movement has been set. If not value then never autorotates.

brightness number | undefined

Brightness on start.

contrast number | undefined

Contrasst on start.

debuggrid boolean | undefined

If true a grid of tiles and Tile IDs is drawn for debugging purposes.

extraZoomLevels number | undefined

Number of zoom levels to add to existing zoom levels defined in any panorama. In the new zoom levels the tiles will be rescaled.

totalZoomLevels number | undefined

Maximum number of zoom levels. Zoom levels defined in any panorama will be redefined to have this number. If this number is greater than the size of the last zoom level defined in the panorama metadata, then the tiles will be shown rescaled. If defined, this property overshadows extraZoomLevels.

interactions Object | undefined

an object with same structure the one Collection.registerDefaultInteractions returns. An object with interaction id as properties and interaction as values.

panoramaSize number | undefined

The size in meters of the cube that shows the panorama. Anything outside this cube will be occluded by it and will not be rendered.

transitionDuration number | undefined

Time in milliseconds that panoramas transition from one to next.

layers Array.<ol.layer.Base> | ol.Collection.<ol.layer.Base> | ol.layer.Group | undefined

Layers. If this is not defined, a map 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.

enforceLayers boolean | undefined

If this viewer should ensure that certain layers are added, as the measurements and annotations layer.

rotatorType Mapspace.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.ROTATOR.

pin boolean | undefined

If add a pin icon in the center of the viewer when viewer is loaded first time. By default is false.

label boolean | 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.

Source:
mapspace-street/typedefs.js

ViewerProperty

Properties of a Mapspace.street.Viewer.

Name Value Description
Mapspace.street.ViewerProperty.IMAGEID imageid Name of the street image loaded.
Mapspace.street.ViewerProperty.ROLL roll Roll.
Mapspace.street.ViewerProperty.PITCH pitch Pitch.
Mapspace.street.ViewerProperty.YAW yaw Yaw.
Mapspace.street.ViewerProperty.FOV fov Fiel of vision.
Mapspace.street.ViewerProperty.BRIGHTNESS brightness Brightness.
Mapspace.street.ViewerProperty.CONTRAST contrast Contrast.
Mapspace.street.ViewerProperty.LAYER layer Layer is a property that defines sets of data.
Mapspace.street.ViewerProperty.MAXDISTANCE maxdistance Maximum distance for requesting vector data
Mapspace.street.ViewerProperty.USEDEPTHMAPM usedepthmapm If the measurements must use the depth map or not
Mapspace.street.ViewerProperty.USEDEPTHMAPA usedepthmapa If the annotations must use the depth map or not
Source:
mapspace-street/enums.js

Namespace: street

Mapspace. street

This is the namespace that contains support classes for the Mapspace.street.Viewer.

Source:
mapspace-street/bu.street.threejs.jsdoc

Classes

DebugEvent
DOMEvent
FixedLevelEvent
GraphFinder
Image
ImagesManager
Viewer

Namespaces

action
controldef
movements

Type Definitions


AnnotationType

Type of the street annotation (point, polyline, polygon, text) for street viewers.

Name Value
Mapspace.street.AnnotationType.POINT Mapspace.AnnotationType.POINT,
Mapspace.street.AnnotationType.POLYLINE Mapspace.AnnotationType.POLYLINE,
Mapspace.street.AnnotationType.POLYGON Mapspace.AnnotationType.POLYGON,
Mapspace.street.AnnotationType.TEXT Mapspace.AnnotationType.TEXT
Source:
mapspace-street/enums.js

CameraParameters

Camera parameters. x, y and z are normally 0,0,0 because the camera is set in the origin, but in certain cases as in an animation or movement effect, camera position can temporarily change.

Properties:
Name Type Description
yaw number | undefined

Angle in +Y axis with zero in -Z direction [PI,-PI].

pitch number | undefined

Angle in +X axis [PI/2,-PI/2].

roll number | undefined

Angle in +Z axis. [PI/2,-PI/2]. It usually is zero.

fov number | undefined

Angle of view in degrees. [0,360.0].

x number | undefined

X position of the camera in scene coordinates. Always meters.

y number | undefined

Y position of the camera in scene coordinates. Always meters.

z number | undefined

Z position of the camera in scene coordinates. Always meters.

Source:
mapspace-street/typedefs.js

DebugEventType

Type of events for debugging.

Name Value Description
Mapspace.street.DebugEventType.DEBUGMESSAGECHANGED debugmessagechanged The debug message has changed
Source:
mapspace-street/enums.js

ImagesManagerEventType

Type of events for a Mapspace.street.ImagesManager.

Name Value Description
Mapspace.street.ImagesManagerEventType.IMAGEADDED imageadded Triggered when a new Image is loaded
Source:
mapspace-street/enums.js

Level

Level properties.

Properties:
Name Type Description
index number

zoom level index

size number

Size in pixels of each full image. For a cube panorama is the full size of each of six images that comprises the cube.

tileSize number

Size of tiles.

numTiles number

size / tileSize. Always an integer value.

Source:
mapspace-street/typedefs.js

MeasurementType

Type of the street measurement (point, segment length, length, elevation, vertical area) for street viewers.

Name Value
Mapspace.street.MeasurementType.POINT Mapspace.MeasurementType.POINT
Mapspace.street.MeasurementType.LENGTH Mapspace.MeasurementType.LENGTH
Mapspace.street.MeasurementType.POLYLENGTH Mapspace.MeasurementType.POLYLENGTH
Mapspace.street.MeasurementType.ELEVATION Mapspace.MeasurementType.ELEVATION
Mapspace.street.MeasurementType.AREA Mapspace.MeasurementType.AREA
Mapspace.street.MeasurementType.VERTICAL_AREA Mapspace.MeasurementType.VERTICAL_AREA
Mapspace.street.MeasurementType.HEIGHT Mapspace.MeasurementType.HEIGHT
Source:
mapspace-street/enums.js

Tile

Tile.

Properties:
Name Type Description
x number

X coordinate of the tile. Tiles start in zero and ranges from upper left corner tile to bottom right corner tile with X and Y increasing in that direction.

y number

Y coordinate of the tile. Tiles start in zero and ranges from upper left corner tile to bottom right corner tile with X and Y increasing in that direction.

z number

Z coordinate of the tile representing the zoom level. The first level is zero and is the one with the minimum number of tiles for each cubic face in the cubemap, usually only one tile.

face string

Tile face (b, d, f, l, r, u). Back, Down, Front, Left, Right or Up.

Source:
mapspace-street/typedefs.js

TransformType

Type of transformation between street coordinates and world coordinates.

Name Value Description
Mapspace.street.TransformType.TOSTREET2D WTS2D Transformation from world 2D coordinates to pixel street image coordinates.
Mapspace.street.TransformType.TOSTREET3D WTS3D Transformation from world 3D coordinates to pixel street image coordinates.
Mapspace.street.TransformType.TOWORLD STW Transformation from pixel street image coordinates at a given distance to world coordinates.
Mapspace.street.TransformType.TOWORLDDEPTHMAP STWDM Transformation from pixel street image coordinates to world coordinates using a depth map
Source:
mapspace-street/enums.js

ViewerEventType

Type of events of a Mapspace.street.Viewer.

Name Value Description
Mapspace.street.ViewerEventType.IMAGEIDCHANGED change:imageid The image id has changed.
Mapspace.street.ViewerEventType.ROLLCHANGED change:roll The roll has changed.
Mapspace.street.ViewerEventType.PITCHCHANGED change:pitch The pitch has changed.
Mapspace.street.ViewerEventType.YAWCHANGED change:yaw The yaw has changed.
Mapspace.street.ViewerEventType.FOVCHANGED change:fov The FOV has changed.
Mapspace.street.ViewerEventType.BRIGHTNESSCHANGED change:brightness The brightness has changed.
Mapspace.street.ViewerEventType.CONTRASTCHANGED change:contrast The contrast has changed.
Mapspace.street.ViewerEventType.LAYERCHANGED change:layer The street layer has changed.
Mapspace.street.ViewerEventType.MAXDISTANCECHANGED change:maxdistance The maximum distance has changed.
Mapspace.street.ViewerEventType.USEDEPTHMAPMCHANGED change:usedepthmapm The use of depth map in measurements has changed.
Mapspace.street.ViewerEventType.USEDEPTHMAPACHANGED change:usedepthmapa The use of depth map in annotations has changed.
Mapspace.street.ViewerEventType.CUBICPANORAMAADDED cubicpanoramaadded Triggered when a new cubic panorama is added to the scene
Mapspace.street.ViewerEventType.IMAGEOPENED imageopened When a street image finishes the opening
Mapspace.street.ViewerEventType.DEPTHMAPCHANGED depthmapchanged The depth map visibility has changed
Source:
mapspace-street/enums.js

ViewerOptions

Options for Mapspace.street.Viewer.

Properties:
Name Type Description
name string | undefined

The name of the viewer.

target Element | string | undefined

The DOM target element where this viewer will be appended.

outputprojection string | undefined

The viewer output projection. The 'EPSG:code' string with the projection to use in any control linked to this viewer when showing coordinates.

debugmode boolean | 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.

debuggrid boolean | undefined

If activate a debug grid or not. Bay 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.

time string | 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.

layer string | undefined

Filter for sets of images when requesting for panoramas.

imageid string | undefined

Image ID to open on start.

center Mapspace.Coordinate | undefined

Center to use on start. If both a center and an iamgeid are provided, then the center will be used.

rotation number | undefined

Resolution on start.

fov number | undefined

FOV on start.

pitch number | undefined

Pitch on start.

yaw number | undefined

Yaw on start.

roll number | undefined

Roll on start. See Mapspace.street.Viewer#getRoll.

autorotate number | undefined

Time in milliseconds to wait to start an autorotateTimeout movement if no other movement has been set. If not value then never autorotates.

brightness number | undefined

Brightness on start.

contrast number | undefined

Contrasst on start.

debuggrid boolean | undefined

If true a grid of tiles and Tile IDs is drawn for debugging purposes.

extraZoomLevels number | undefined

Number of zoom levels to add to existing zoom levels defined in any panorama. In the new zoom levels the tiles will be rescaled.

totalZoomLevels number | undefined

Maximum number of zoom levels. Zoom levels defined in any panorama will be redefined to have this number. If this number is greater than the size of the last zoom level defined in the panorama metadata, then the tiles will be shown rescaled. If defined, this property overshadows extraZoomLevels.

interactions Object | undefined

an object with same structure the one Collection.registerDefaultInteractions returns. An object with interaction id as properties and interaction as values.

panoramaSize number | undefined

The size in meters of the cube that shows the panorama. Anything outside this cube will be occluded by it and will not be rendered.

transitionDuration number | undefined

Time in milliseconds that panoramas transition from one to next.

layers Array.<ol.layer.Base> | ol.Collection.<ol.layer.Base> | ol.layer.Group | undefined

Layers. If this is not defined, a map 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.

enforceLayers boolean | undefined

If this viewer should ensure that certain layers are added, as the measurements and annotations layer.

rotatorType Mapspace.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.ROTATOR.

pin boolean | undefined

If add a pin icon in the center of the viewer when viewer is loaded first time. By default is false.

label boolean | 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.

Source:
mapspace-street/typedefs.js

ViewerProperty

Properties of a Mapspace.street.Viewer.

Name Value Description
Mapspace.street.ViewerProperty.IMAGEID imageid Name of the street image loaded.
Mapspace.street.ViewerProperty.ROLL roll Roll.
Mapspace.street.ViewerProperty.PITCH pitch Pitch.
Mapspace.street.ViewerProperty.YAW yaw Yaw.
Mapspace.street.ViewerProperty.FOV fov Fiel of vision.
Mapspace.street.ViewerProperty.BRIGHTNESS brightness Brightness.
Mapspace.street.ViewerProperty.CONTRAST contrast Contrast.
Mapspace.street.ViewerProperty.LAYER layer Layer is a property that defines sets of data.
Mapspace.street.ViewerProperty.MAXDISTANCE maxdistance Maximum distance for requesting vector data
Mapspace.street.ViewerProperty.USEDEPTHMAPM usedepthmapm If the measurements must use the depth map or not
Mapspace.street.ViewerProperty.USEDEPTHMAPA usedepthmapa If the annotations must use the depth map or not
Source:
mapspace-street/enums.js