public final class

SteerpathMap

extends Object
java.lang.Object
   ↳ com.steerpath.sdk.maps.SteerpathMap

Class Overview

The SteerpathMap is the controller for the SteerpathMapView. It exposes some additional functionality compared to the MapboxMap controller, but all standard MapboxMap functionality is indirectly available from the pass-though methods such as getSource(String).

Note: Some functionality is implemented both in MapboxMap and in SteerpathMap. You should always use the functionality from the SteerpathMap in such cases.

Summary

Nested Classes
enum SteerpathMap.BlueDotMode List of different blue dot behavior modes. 
enum SteerpathMap.MapMode List of different map behavior modes. 
interface SteerpathMap.OnIndoorStateChangeListener With this listener, application may listen when focused building and level changes. 
Public Methods
SteerpathAnnotation addAnnotation(SteerpathAnnotationOptions options)
SteerpathAnnotation is created and added to Mapbox map when correct building and floor are focused.
List<SteerpathAnnotation> addAnnotations(List<SteerpathAnnotationOptions> options)
Adds list of SteerpathAnnotations to the map, just like addAnnotation(SteerpathAnnotationOptions)

Deprecated: Will be removed when proper replacement has been implemented for managing Layers.
void addHighlight(String localRef, String buildingRef)
Add "highlight" effect for the map data.
void addImage(String name, Drawable drawable)
Adds an icon image to the Mapbox.
void addImage(String name, Bitmap image)
Adds an icon image to the Mapbox.
void addImage(String name, int drawableRes)
Adds an icon image to the Mapbox.
void addLayer(Layer layer)
Add Layer to the last index.
void addLayerAbove(Layer layer, String above)
Add Layer above another layer.
void addLayerAt(Layer layer, int index)
Add Layer at index.
void addLayerBelow(Layer layer, String below)
Add Layer below another layer.
Marker addMarker(MarkerOptions options)
Adds Marker into the map with given specification.
void addMarkerListener(MarkerListener listener)
Registers a MarkerListener for receiving Marker events.
List<Marker> addMarkers(List<MarkerOptions> options)
Adds list of Markers, just like addMarker(MarkerOptions).
void addOnCameraIdleListener(MapboxMap.OnCameraIdleListener listener)
Listen idle camera events.
void addOnCameraMoveCancelListener(MapboxMap.OnCameraMoveCanceledListener listener)
Listen camera movement canceled events.
void addOnCameraMoveListener(MapboxMap.OnCameraMoveListener listener)
Listen camera movement events.
void addOnCameraMoveStartedListener(MapboxMap.OnCameraMoveStartedListener listener)
Listen camera movement started events.
void addOnFlingListener(MapboxMap.OnFlingListener listener)
Listen map fling events.
void addOnIndoorStateChangeListener(SteerpathMap.OnIndoorStateChangeListener listener)
To receive notifications when a new building comes into focus or a new floor is activated, the OnIndoorStateChangeListener interface can be used.
void addOnMapClickListener(MapboxMap.OnMapClickListener listener)
Listen map click events.
void addOnMapLongClickListener(MapboxMap.OnMapLongClickListener listener)
Listen long tap events.
void addOnMoveListener(MapboxMap.OnMoveListener listener)
Listen map scroll events.
void addPolygon(MetaFeature feature, int color)
Visualizes MetaFeature area with given color.
void addSource(Source source)
Add (Mapbox) Source to the map.
void animateCamera(CameraUpdate cameraUpdate, int duration)
Repositions the camera according to the cameraPosition.
void animateCamera(CameraUpdate cameraUpdate, int duration, MapboxMap.CancelableCallback callback)
Repositions the camera according to the cameraPosition.
void clearAllHighlights()
Remove all highlight effects.
void easeCamera(CameraUpdate cameraUpdate, int durationMs)
Repositions the camera according to the cameraPosition.
void easeCamera(CameraUpdate cameraUpdate, int durationMs, boolean easingInterpolator)
Repositions the camera according to the cameraPosition.
void easeCamera(CameraUpdate cameraUpdate)
Repositions the camera according to the cameraPosition.
void easeCamera(CameraUpdate cameraUpdate, int durationMs, boolean easingInterpolator, MapboxMap.CancelableCallback callback)
Repositions the camera according to the cameraPosition.
SteerpathAnnotation getAnnotation(long id)
Returns SteerpathAnnotation for given (Mapbox) id.
List<SteerpathAnnotation> getAnnotations()
Returns all SteerpathAnnotation that was previously added.
CameraPosition getCameraPosition()
Gets the current position of the camera.
IndoorBuilding getFocusedBuilding()
Retrieve the building which is currently in "focus" i.e.
Bitmap getImage(String iconName)
Retrieve icon image that was previously added with addImage(String, Bitmap)
Layer getLayer(String layerId)
Retrieve Layer with given name.
List<Layer> getLayers()
Retrieve all Layer names.
SteerpathMapOptions getMapOptions()
Retrieve the UI settings object which can be used to configure what Steerpath UI elements are shown.
List<Marker> getMarkers()
Return all Markers.
MetaFeature getRenderedMetaFeature(LatLng point)
Queries rendered (Mapbox) Features and returns (Steerpath) MetaFeature in response.
MetaFeature getRenderedMetaFeature(LatLng point, String... layerIds)
Queries rendered (Mapbox) Features from given Layers and returns (Steerpath) MetaFeature in response.
List<MetaFeature> getRenderedMetaFeatures(LatLng point)
Queries rendered (Mapbox) Features and returns list of (Steerpath) MetaFeatures in response.
List<MetaFeature> getRenderedMetaFeatures(LatLng point, String... layerIds)
Queries rendered (Mapbox) Features and returns list of (Steerpath) MetaFeatures in response.
Source getSource(String sourceId)
Retrieve Source.
<T extends Source> T getSourceAs(String sourceId)
Get Source as Generic Type.
List<Source> getSources()
Retrieve all Source names.
boolean hasLayer(String layerId)
Checks if Layer has been added to the map.
boolean hasSource(String sourceId)
Checks if Source has been added to the map.
boolean isCompassEnabled()
Checks if Compass widget in top | right corner is enabled or not.
void moveCamera(CameraUpdate cameraUpdate, MapboxMap.CancelableCallback callback)
Repositions the camera according to the cameraPosition.
void moveCamera(CameraUpdate cameraUpdate)
Repositions the camera according to the cameraPosition.
void panToLocation(Location location)
Move the viewport to view a given location.
void panToUser()
Move the view point to the location where the user is currently.
List<Feature> queryRenderedFeatures(PointF coordinates, String... layerIds)
Queries rendered (Mapbox) Features.
void removeAllMarkers()
Removes all Markers.
void removeAnnotation(SteerpathAnnotation ann)
Removes previously added SteerpathAnnotation from the map.
void removeAnnotations(List<SteerpathAnnotation> anns)
Removes list of previously added SteerpathAnnotations from the map.
boolean removeLayer(String layerId)
Removes Layer from the Mapbox.
boolean removeLayer(Layer layer)
Removes Layer from the Mapbox.
void removeMarker(Marker marker)
Removes Marker that was previously added with addMarker(MarkerOptions) or addMarkers(List).
void removeMarkerListener(MarkerListener listener)
Unregisters a MarkerListener that was previously added with addMarkerListener(MarkerListener)
void removeMarkers(List<Marker> markers)
Removes Markers that was previously added with addMarker(MarkerOptions) or addMarkers(List).
void removeOnCameraIdleListener(MapboxMap.OnCameraIdleListener listener)
Stop listening idle camera events.
void removeOnCameraMoveCancelListener(MapboxMap.OnCameraMoveCanceledListener listener)
Stop listening camera movement canceled events.
void removeOnCameraMoveListener(MapboxMap.OnCameraMoveListener listener)
Stop listening camera movement events.
void removeOnCameraMoveStartedListener(MapboxMap.OnCameraMoveStartedListener listener)
Stop listening camera movement started events.
void removeOnFlingListener(MapboxMap.OnFlingListener listener)
Stop listening map fling events.
void removeOnIndoorStateChangeListener(SteerpathMap.OnIndoorStateChangeListener listener)
void removeOnMapClickListener(MapboxMap.OnMapClickListener listener)
Stop listening map click events.
void removeOnMapLongClickListener(MapboxMap.OnMapLongClickListener listener)
Stop listening long tap events.
void removeOnMoveListener(MapboxMap.OnMoveListener listener)
Stop listening map scroll events.
void removePolygon(MetaFeature feature)
Removes area visualization from the map.
void removeSource(String sourceId)
Removes (Mapbox) Source from the map.
void setActiveLevel(String buildingId, int levelIndex)
A convenience method to specify a default building and a level in the building.
void setAllGesturesEnabled(boolean isEnabled)
When gestures are disabled, map does not accept touch events.
void setBlueDotMode(SteerpathMap.BlueDotMode newMode)
The SteerpathMap has a few different modes relating to how blue dot is rendered.
void setBluedotMaxAccuracy(float maxAccuracy)
Limit the BlueDot circle size when using indoor positioning.
void setCameraPosition(CameraPosition cameraPosition)
Repositions the camera according to the cameraPosition and takes the camera padding into account.
void setCameraTo(LatLng latLng)
Sets the camera position to LatLng using default zoom level (18).
void setCameraTo(MetaFeature feature)
Sets the camera position to MetaFeature using default zoom level (18).
void setCompassEnabled(boolean isCompassEnabled)
Show or hide Compass widget in top | right corner of the screen.
void setLatLngBoundsForCameraTarget(LatLngBounds bounds)
Prevent map panning outside of given boundaries.
void setLiveUserListener(LiveUserListener listener)
Listen LiveUser updates.
void setLiveUserProperty(String identifier, String key, String value)
Overrides LiveUser properties.
void setLocationRequest(LocationRequest request)
Sets LocationRequest for the map and MyLocation functionality.
void setMapMode(SteerpathMap.MapMode newMapMode)
The SteerpathMap has a few different modes relating to how the user updates automatically affect the view.
void setMaxZoomLevel(double zoomLevel)
Adjust max zoom level.
void setMinZoomLevel(double zoomLevel)
Adjust min zoom level.
void setMyLocationEnabled(boolean isEnabled)
Enable showing the user marker, i.e.
void setOnIndoorStateChangeListener(SteerpathMap.OnIndoorStateChangeListener listener)
To receive notifications when a new building comes into focus or a new floor is activated, the OnIndoorStateChangeListener interface can be used.
void setOnMarkerClickListener(MapboxMap.OnMarkerClickListener listener)
Listen marker click events.
List<SteerpathAnnotation> setRouteLine(Route route, RouteOptionsFactory factory)
Set the route which should be visualized on the map.
List<SteerpathAnnotation> setRouteLine(Route route)
Set the route which should be visualized on the map.
List<SteerpathAnnotation> setRouteLines(List<Route> routes)
Set the route which should be visualized on the map.
void setTiltGesturesEnabled(boolean isEnabled)
Enable or disable tilt gestures.
void setUserLocation(Location location)
Set the user dot's (aka blue dot) current location.
PointF toScreenLocation(LatLng latLng)
Converts LatLng to screen coordinates.
void toggleBlueDotMode()
Toggles BlueDot mode between NORMAL and HEADING.
void toggleMapMode()
Toggles Map mode between NORMAL and FOLLOW_USER.
void update(SteerpathLayerOptions options)
Updates Layer's current Filters.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public SteerpathAnnotation addAnnotation (SteerpathAnnotationOptions options)

SteerpathAnnotation is created and added to Mapbox map when correct building and floor are focused.

To undo this, call removeAnnotation(SteerpathAnnotation)
Don't do anything silly, like first add SteerpathAnnotation, then obtain concrete Mapbox Annotation from it, then remove Mapbox Annotation directly from the map by its id!

Deprecated: Will be removed when proper replacement has been implemented for managing Layers.

public List<SteerpathAnnotation> addAnnotations (List<SteerpathAnnotationOptions> options)

Adds list of SteerpathAnnotations to the map, just like addAnnotation(SteerpathAnnotationOptions)

Deprecated: Will be removed when proper replacement has been implemented for managing Layers.

public void addHighlight (String localRef, String buildingRef)

Add "highlight" effect for the map data. This activates "highlight" style for given POI.

public void addImage (String name, Drawable drawable)

Adds an icon image to the Mapbox.

public void addImage (String name, Bitmap image)

Adds an icon image to the Mapbox.

public void addImage (String name, int drawableRes)

Adds an icon image to the Mapbox.

public void addLayer (Layer layer)

Add Layer to the last index.

public void addLayerAbove (Layer layer, String above)

Add Layer above another layer.

public void addLayerAt (Layer layer, int index)

Add Layer at index.

public void addLayerBelow (Layer layer, String below)

Add Layer below another layer.

public Marker addMarker (MarkerOptions options)

Adds Marker into the map with given specification. Does not add duplicate Markers. Marker is considered duplicate if another Marker with id(String) or localRef(String) already exists. In that case, the previously created Marker will be returned.

Parameters
options specification for Marker creation
Returns
  • new Marker or previously created Marker instance

public void addMarkerListener (MarkerListener listener)

Registers a MarkerListener for receiving Marker events.

public List<Marker> addMarkers (List<MarkerOptions> options)

Adds list of Markers, just like addMarker(MarkerOptions).
This method is not optimized for very large collection (thousands) of Markers.

public void addOnCameraIdleListener (MapboxMap.OnCameraIdleListener listener)

Listen idle camera events.

public void addOnCameraMoveCancelListener (MapboxMap.OnCameraMoveCanceledListener listener)

Listen camera movement canceled events.

public void addOnCameraMoveListener (MapboxMap.OnCameraMoveListener listener)

Listen camera movement events.

public void addOnCameraMoveStartedListener (MapboxMap.OnCameraMoveStartedListener listener)

Listen camera movement started events.

public void addOnFlingListener (MapboxMap.OnFlingListener listener)

Listen map fling events.

public void addOnIndoorStateChangeListener (SteerpathMap.OnIndoorStateChangeListener listener)

To receive notifications when a new building comes into focus or a new floor is activated, the OnIndoorStateChangeListener interface can be used.

Parameters
listener the object which should receive callbacks when a building comes into focus or leaves focus, or when the activated floor changes.

public void addOnMapClickListener (MapboxMap.OnMapClickListener listener)

Listen map click events.
If you are not receiving click events, check your onMarkerClick(Marker) return value.

public void addOnMapLongClickListener (MapboxMap.OnMapLongClickListener listener)

Listen long tap events.

public void addOnMoveListener (MapboxMap.OnMoveListener listener)

Listen map scroll events.

public void addPolygon (MetaFeature feature, int color)

Visualizes MetaFeature area with given color.

public void addSource (Source source)

Add (Mapbox) Source to the map.

public void animateCamera (CameraUpdate cameraUpdate, int duration)

Repositions the camera according to the cameraPosition. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position. See com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.

Parameters
cameraUpdate the camera position to set

public void animateCamera (CameraUpdate cameraUpdate, int duration, MapboxMap.CancelableCallback callback)

Repositions the camera according to the cameraPosition. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position. See com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.

Parameters
cameraUpdate the camera position to set
callback callback to be invoked after animation is done

public void clearAllHighlights ()

Remove all highlight effects.

public void easeCamera (CameraUpdate cameraUpdate, int durationMs)

Repositions the camera according to the cameraPosition. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position. See com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.

Parameters
cameraUpdate the camera position to set

public void easeCamera (CameraUpdate cameraUpdate, int durationMs, boolean easingInterpolator)

Repositions the camera according to the cameraPosition. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position. See com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.

Parameters
cameraUpdate the camera position to set

public void easeCamera (CameraUpdate cameraUpdate)

Repositions the camera according to the cameraPosition. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position. See com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.

Parameters
cameraUpdate the camera position to set

public void easeCamera (CameraUpdate cameraUpdate, int durationMs, boolean easingInterpolator, MapboxMap.CancelableCallback callback)

Repositions the camera according to the cameraPosition. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position. See com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.

Parameters
cameraUpdate the camera position to set

public SteerpathAnnotation getAnnotation (long id)

Returns SteerpathAnnotation for given (Mapbox) id. If SteerpathAnnotation is not rendered at the moment, null is returned.

Deprecated: Will be removed when proper replacement has been implemented for managing Layers.

public List<SteerpathAnnotation> getAnnotations ()

Returns all SteerpathAnnotation that was previously added.

Deprecated: use addMarker(MarkerOptions) instead. Will be removed when proper replacement has been implemented for managing Layers.

public CameraPosition getCameraPosition ()

Gets the current position of the camera. The CameraPosition returned is a snapshot of the current position, and will not automatically update when the camera moves.@return

public IndoorBuilding getFocusedBuilding ()

Retrieve the building which is currently in "focus" i.e. the one relating to the currently visible level picker. Returns null if none is currently focused.

Returns
  • the building which is currently in view or null if we are zoomed out too far or no building with indoor information is in view.

public Bitmap getImage (String iconName)

Retrieve icon image that was previously added with addImage(String, Bitmap)

Returns
  • null if Bitmap with given icon name was not found

public Layer getLayer (String layerId)

Retrieve Layer with given name.

Returns
  • null if no such Layer exists.

public List<Layer> getLayers ()

Retrieve all Layer names.

public SteerpathMapOptions getMapOptions ()

Retrieve the UI settings object which can be used to configure what Steerpath UI elements are shown.

Note: Some other UI aspects of the map can be configured through the MapboxMap version of UISettings.@return

public List<Marker> getMarkers ()

Return all Markers.

public MetaFeature getRenderedMetaFeature (LatLng point)

Queries rendered (Mapbox) Features and returns (Steerpath) MetaFeature in response.

public MetaFeature getRenderedMetaFeature (LatLng point, String... layerIds)

Queries rendered (Mapbox) Features from given Layers and returns (Steerpath) MetaFeature in response.

public List<MetaFeature> getRenderedMetaFeatures (LatLng point)

Queries rendered (Mapbox) Features and returns list of (Steerpath) MetaFeatures in response.

public List<MetaFeature> getRenderedMetaFeatures (LatLng point, String... layerIds)

Queries rendered (Mapbox) Features and returns list of (Steerpath) MetaFeatures in response.

public Source getSource (String sourceId)

Retrieve Source.

Returns
  • null if no such Source was found

public T getSourceAs (String sourceId)

Get Source as Generic Type.

Returns
  • null if no such Source was found

public List<Source> getSources ()

Retrieve all Source names.

public boolean hasLayer (String layerId)

Checks if Layer has been added to the map.

public boolean hasSource (String sourceId)

Checks if Source has been added to the map.

public boolean isCompassEnabled ()

Checks if Compass widget in top | right corner is enabled or not.

public void moveCamera (CameraUpdate cameraUpdate, MapboxMap.CancelableCallback callback)

Repositions the camera according to the cameraPosition. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position. See com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.

Parameters
cameraUpdate the camera position to set
callback callback to be invoked after animation is done

public void moveCamera (CameraUpdate cameraUpdate)

Repositions the camera according to the cameraPosition. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position. See com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates.

Parameters
cameraUpdate the camera position to set

public void panToLocation (Location location)

Move the viewport to view a given location.

Parameters
location the location from which to extract the latitude, longitude and level to pan to.

public void panToUser ()

Move the view point to the location where the user is currently.

public List<Feature> queryRenderedFeatures (PointF coordinates, String... layerIds)

Queries rendered (Mapbox) Features. Does not wrap then inside of (Steerpath) MetaFeature.

public void removeAllMarkers ()

Removes all Markers.

public void removeAnnotation (SteerpathAnnotation ann)

Removes previously added SteerpathAnnotation from the map.

Deprecated: Will be removed when proper replacement has been implemented for managing Layers.

public void removeAnnotations (List<SteerpathAnnotation> anns)

Removes list of previously added SteerpathAnnotations from the map.

Deprecated: Will be removed when proper replacement has been implemented for managing Layers.

public boolean removeLayer (String layerId)

Removes Layer from the Mapbox.

Returns
  • true if layer was removed successfully

public boolean removeLayer (Layer layer)

Removes Layer from the Mapbox.

Returns
  • true if layer was removed successfully

public void removeMarker (Marker marker)

Removes Marker that was previously added with addMarker(MarkerOptions) or addMarkers(List).

public void removeMarkerListener (MarkerListener listener)

Unregisters a MarkerListener that was previously added with addMarkerListener(MarkerListener)

public void removeMarkers (List<Marker> markers)

Removes Markers that was previously added with addMarker(MarkerOptions) or addMarkers(List).

public void removeOnCameraIdleListener (MapboxMap.OnCameraIdleListener listener)

Stop listening idle camera events.

public void removeOnCameraMoveCancelListener (MapboxMap.OnCameraMoveCanceledListener listener)

Stop listening camera movement canceled events.

public void removeOnCameraMoveListener (MapboxMap.OnCameraMoveListener listener)

Stop listening camera movement events.

public void removeOnCameraMoveStartedListener (MapboxMap.OnCameraMoveStartedListener listener)

Stop listening camera movement started events.

public void removeOnFlingListener (MapboxMap.OnFlingListener listener)

Stop listening map fling events.

public void removeOnIndoorStateChangeListener (SteerpathMap.OnIndoorStateChangeListener listener)

public void removeOnMapClickListener (MapboxMap.OnMapClickListener listener)

Stop listening map click events.

public void removeOnMapLongClickListener (MapboxMap.OnMapLongClickListener listener)

Stop listening long tap events.

public void removeOnMoveListener (MapboxMap.OnMoveListener listener)

Stop listening map scroll events.

public void removePolygon (MetaFeature feature)

Removes area visualization from the map.

public void removeSource (String sourceId)

Removes (Mapbox) Source from the map.

public void setActiveLevel (String buildingId, int levelIndex)

A convenience method to specify a default building and a level in the building.

Parameters
buildingId the string id for the building to set into focus
levelIndex the level in the building to set as active by default.

public void setAllGesturesEnabled (boolean isEnabled)

When gestures are disabled, map does not accept touch events. No scrolling, no panning. Camera position can be changed programmatically.

public void setBlueDotMode (SteerpathMap.BlueDotMode newMode)

The SteerpathMap has a few different modes relating to how blue dot is rendered. This allows changing that behaviour. If requested mode is HEADING and device does not have a compass, nothing happens.

public void setBluedotMaxAccuracy (float maxAccuracy)

Limit the BlueDot circle size when using indoor positioning. Affects only how the BlueDot circle is visualized, not actual accuracy of the Location. If in GPS, this value has no effect. 15 meters by default.

Parameters
maxAccuracy radius in meters

public void setCameraPosition (CameraPosition cameraPosition)

Repositions the camera according to the cameraPosition and takes the camera padding into account. The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position.

Parameters
cameraPosition the camera position to set

public void setCameraTo (LatLng latLng)

Sets the camera position to LatLng using default zoom level (18). Convenience method.

public void setCameraTo (MetaFeature feature)

Sets the camera position to MetaFeature using default zoom level (18). Convenience method.

public void setCompassEnabled (boolean isCompassEnabled)

Show or hide Compass widget in top | right corner of the screen.

public void setLatLngBoundsForCameraTarget (LatLngBounds bounds)

Prevent map panning outside of given boundaries.

public void setLiveUserListener (LiveUserListener listener)

Listen LiveUser updates. LiveUsers may appear or disappear from the map or their status may change.

See also fetchLiveUsers(String[], LiveUserCallback). You can fetch list of all known LiveUsers, not just those that appears on the map.

Parameters
listener null to stop listening LiveUser updates

public void setLiveUserProperty (String identifier, String key, String value)

Overrides LiveUser properties. For example, LiveUser title can be concealed. Consider Live user with id="id-1234" and title="John Doe". To show "John Doe" as "Employee", call setLiveUserProperty("id-1234", "title", "Employee");

Parameters
identifier unique object identifier must match with LiveUser id.
key property name. Supported keys: "title"
value containing additional information

public void setLocationRequest (LocationRequest request)

Sets LocationRequest for the map and MyLocation functionality. If this is not set, or set to null, then default LocationRequest will be used (indoor positioning enabled, gps disabled). To make the change of LocationRequest effective, call setMyLocationEnabled(boolean) again.

public void setMapMode (SteerpathMap.MapMode newMapMode)

The SteerpathMap has a few different modes relating to how the user updates automatically affect the view. This allows changing that behaviour.

Parameters
newMapMode the new map mode to use

public void setMaxZoomLevel (double zoomLevel)

Adjust max zoom level.

public void setMinZoomLevel (double zoomLevel)

Adjust min zoom level.

public void setMyLocationEnabled (boolean isEnabled)

Enable showing the user marker, i.e. the "blue dot", on the map. If no location source has been set, enabling this will create a new instance of the FusedLocationSource and activate it.

On location timeout, UserLocationView is set invisible and automatically restored when location is next time received.

Parameters
isEnabled true to activate the location source and to start displaying the user location on the map. False to deactivate the user dot and hide it from the map.

public void setOnIndoorStateChangeListener (SteerpathMap.OnIndoorStateChangeListener listener)

To receive notifications when a new building comes into focus or a new floor is activated, the OnIndoorStateChangeListener interface can be used.

Deprecated: use addOnIndoorStateChangeListener(OnIndoorStateChangeListener) instead.

Parameters
listener the object which should receive callbacks when a building comes into focus or leaves focus, or when the activated floor changes.

public void setOnMarkerClickListener (MapboxMap.OnMarkerClickListener listener)

Listen marker click events. There can be only one listener registered at the time. New Listener will replace the old one.

public List<SteerpathAnnotation> setRouteLine (Route route, RouteOptionsFactory factory)

Set the route which should be visualized on the map. The route will automatically be split into segments for each level and relevant icons will be shown to indicate transitions between floors.

This function will in effect create Annotation objects and add them to the map. SteerpathAnnotations are returned in order to make it possible to remove them later on.

Parameters
route data
factory customize appearance of the route

public List<SteerpathAnnotation> setRouteLine (Route route)

Set the route which should be visualized on the map. The route will automatically be split into segments for each level and relevant icons will be shown to indicate transitions between floors.

This function will in effect create Annotation objects and add them to the map. SteerpathAnnotations are returned in order to make it possible to remove them later on.

Parameters
route data

public List<SteerpathAnnotation> setRouteLines (List<Route> routes)

Set the route which should be visualized on the map. The route will automatically be split into segments for each level and relevant icons will be shown to indicate transitions between floors.

This function will in effect create Annotation objects and add them to the map. SteerpathAnnotations are returned in order to make it possible to remove them later on.

Route lines are rendered with default appearance. All Routes are merged into one Layer, making this method much more memory friendly than setRouteLine(Route) and setRouteLine(Route, RouteOptionsFactory).

Returns
  • list of SteerpathAnnotations for reference.

public void setTiltGesturesEnabled (boolean isEnabled)

Enable or disable tilt gestures.

public void setUserLocation (Location location)

Set the user dot's (aka blue dot) current location.

The MapMode and UI Settings currently in use will define if the map view will change when the user's location is updated.

Parameters
location the location to which the user dot should be moved.

public PointF toScreenLocation (LatLng latLng)

Converts LatLng to screen coordinates.

public void toggleBlueDotMode ()

Toggles BlueDot mode between NORMAL and HEADING. If device does not have a compass, HEADING mode cannot be set.

public void toggleMapMode ()

Toggles Map mode between NORMAL and FOLLOW_USER.

public void update (SteerpathLayerOptions options)

Updates Layer's current Filters.

Deprecated: Will be removed when proper replacement has been implemented for managing Layers.