Events

Events

new Events()

SteerpathMap fires events that can be listened just like any other Mapbox events
Example
mapboxMap.on('event_name' , function(event){
  //Do your thing
});
Properties:
Name Type Description
steerpathBuildingExit event Fired when building is no longer the active building
Properties
Name Type Description
buildingExited object The building JSON for the building which is no longer the current active building.
steerpathBuildingEntered event Fired when a building becomes the active building
Properties
Name Type Description
enteredBuilding object The building JSON for the building which has become the current active building.
steerpathBuildingAnalysed event Fired when API has analysed building in the view.
Properties
Name Type Description
analysedBuilding object Analysed building object.
steerpathBeforeBuildingChanged event Fired when entering a building not seen before.
Properties
Name Type Description
buildingBeforeChange object Previous building object.
newActiveBuilding object New entered building object.
layerIndexBeforeChange number Previous building's layer index.
steerpathBuildingChanged event Fired when entering building not seen before.
Properties
Name Type Description
newActiveBuilding object New entered building object.
newLayerIndex number New layer index.
steerpathBeforeLayerIndexChanged event Fired before building's layer index changes
Properties
Name Type Description
buildingRef string Buildings reference string
layerIndexBeforeChange number Buildings old layer index.
newLayerIndex number Buildings new layer index.
steerpathLayerIndexChanged event Fired when buildings layer index has changed.
Properties
Name Type Description
buildingRef string Buildings reference string.
newLayerIndex number New layer index.
steerpathShowcaseStarted event Fired when Showcase animation has started.
Properties
Name Type Description
showcase object Instance of Showcase.
steerpathShowcaseStopped event Fired when Showcase animation has stopped.
Properties
Name Type Description
showcase object Instance of Showcase.
steerpathRouteAdded event Fired when route is added to the map.
Properties
Name Type Description
routeManager Instance of RouteManager
steerpathRouteRemoved event Fired when route is removed from the map
Properties
Name Type Description
routeManager Instance of RouteManager
steerpathRouteAnimationStarted event Fired when route animation has started
Properties
Name Type Description
routeAnimationManager event Instance of RouteAnimationManager
steerpathRouteAnimationStopped event Fired when route animation has stopped
Properties
Name Type Description
routeAnimationManager event Instance of RouteAnimationManager
steerpathRouteAnimationFinished event Fired when route animation has reached its destination
Properties
Name Type Description
routeAnimationManager event Instance of RouteAnimationManager
See: