Navigator Class
Constructor
Navigator, responsible for displaying directions in simple and complex journeys
Methods
Attributes
Events
Zooms back out into overview mode, displaying the whole journey, draws the full path once again.
Exits out of navigation and focuses on currently selected map.
Returns:
A promise that will resolve once the currently selected map is focused on
-
directions
Sets up the navigator for a set of directions. Typically uses directions returned by startNode.directionsTo()
calls.
This can be used to update the directions object any time.
-
options
Sets up navigator settings. Typically uses options as documented by Navigator.showOverview()
*
Parameters:
-
[options]
Object optionalOptions Object
-
[hideLabels=false]
Boolean optionalHide labels after showing journey
-
[drawConnectionMarkers=true]
Boolean optionalDraw multi-floor connection markers
-
[drawDepartureMarker=true]
Boolean optionalDraw marker indicating departure
-
[drawDestinationMarker=true]
Boolean optionalDraw marker indicating destination
-
[showConnectionType=true]
Boolean optionalAdds icon indicating connection type to connection markers
-
[debug=false]
Boolean optionalShow debug information
-
[connectionsThreshold=100]
Number optionalDistance in meters between entry and exit connections on a floor to use as a threshold to make it into a virtual layer
-
[combineSimilarConnections=true]
Boolean optionalCombine floors with similar entry and exit connections into virtual layers
-
[pathOptions]
Object optionalOptions for path drawing. See MapView3D/drawPath options for customizing path
-
[focusOptions]
Object optionalOptions for focusing on the path when in single floor mode. See See MapView3D/focusOn
-
[showPathBehindObjects=false]
Boolean optionalShow occluded path portions with lowered transparency
-
[expandOptions]
Object optionalOptions for expanding the maps.
-
[enabled]
Boolean optionalDetermine whether to expand the maps or remain in single map mode -
[focus=false]
Boolean optionalFocus the camera onto expanded maps -
[rotation=0]
Number optionalRotation of scene relative to zero (degrees) -
[duration=300]
Number optionalDuration of focus animation in ms -
[focusOnInteractivePolygons=false]
Boolean optionalDetermine whether to focus on full map objects or only interactive polygons
-
-
-
scale
Sets multiplier scale to better fit 4K and 8K screens at 1:1 pixel ratio. If stuff is too small on 4K screens, set to 2, etc.
Parameters:
-
scale
Number=1Scale up DOM elements by this multiplier
-
directions
-
[directions.animationDuration}
Enters journey overview mode. Handles multi-floor navigation and drawing of the path.
Note: Pass directions if they haven't been set using Navigator.setDirections()
Parameters:
-
[directions]
Object optionalOptional parameters to customize specific behaviours.
-
[path]
Array optionalArray of nodes representing path to travel
-
[instructions]
Array optionalArray of instructions for journey
-
[options]
Object optionalOptions object as documented in setOptions
-
-
[directions.animationDuration}
NumberTime in ms for the animation to take
Returns:
A promise that will resolve once the maps are displayed and path drawn
-
mapId
Zooms into a specific map in the journey. This can be useful when showing the user detailed directions on a specific map *
Parameters:
-
mapId
Mappedin.Map | StringMappedin Map Object or Map Id
Returns:
A promise that will resolve once the map is zoomed in to