LocationIndicator class abstract

Graphical object to represent the location of the user on the map.

It is either a green dot for pedestrian style or a triangular arrow for vehicle navigation style. This style can be changed by LocationIndicator.locationIndicatorStyle

The location is made available to an instance of this class by calling LocationIndicator.updateLocation or LocationIndicator.updateLocationAndCamera.

Use LocationIndicator.enable to add this object to the map and LocationIndicator.disable to remove it.

Note: The LocationIndicator is always rendered at a fixed altitude near 0. Changing the MapCamera to look at geographic coordinates with an altitude that is higher can cause the following behavior: If the MapCamera angle is tilted and altitude is too high, the LocationIndicator can unexpectedly disappear from the viewport due to the new perspective.

Constructors

LocationIndicator()
Creates an instance of LocationIndicator.
factory
LocationIndicator.withMapView(MapViewBase mapView)
Creates an instance of LocationIndicator and adds it to provided MapViewBase.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isAccuracyVisualized ↔ bool
Whether the horizontal accuracy is visualized by scaling the accuracy indicator halo. Returns whether Location.horizontalAccuracyInMeters is used to scale the accuracy indicator halo. Default is false, in which case the halo has a fixed and zoom level independent size.
getter/setter pair
isActive ↔ bool
A Boolean value that determines whether the active on inactive version of location indicator is shown. Returns true if active version of the location indicator is shown or false when inactive version is shown. By default, it is true.
getter/setter pair
locationIndicatorStyle LocationIndicatorIndicatorStyle
The visual style of location indicator. By default, it is set to LocationIndicatorIndicatorStyle.navigation. Returns visual style of location indicator.
getter/setter pair
materialReflectivity MaterialReflectivity?
The material reflectivity properties of the location indicator. Enables per‑pixel lighting for all internal markers (navigation, pedestrian, inactive variants) and the halo when assigned. While materialReflectivity is non‑null the markers are shaded by scene lights using the provided ambient / diffuse factors. When set back to null, lighting is disabled and markers revert to unlit (emissive) rendering.
getter/setter pair
opacity ↔ double
The factor applied to the alpha channel of both the location indicator's texture and the accuracy indicator's halo color. Default value is 1.0 which means location indicator is displayed with the default alpha channel of the texture. Gets the current opacity of the location indicator.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

disable() → void
This function removes LocationIndicator from map view.
enable(MapViewBase mapView) → void
Enables LocationIndicator for provided MapViewBase.
getHaloColor(LocationIndicatorIndicatorStyle style) → Color
Retrieves the color of the accuracy indicator halo for the requested IndicatorStyle.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setHaloColor(LocationIndicatorIndicatorStyle style, Color color) → void
Sets the color of the accuracy indicator halo for a given style.
setMarker3dModel(MapMarker3DModel model, double scale, LocationIndicatorMarkerType type) → void
Sets the MapMarker3DModel asset to be displayed as location indicator for a specified type.
setMarker3dModelWithRenderSizeUnit(MapMarker3DModel model, double scale, LocationIndicatorMarkerType type, RenderSizeUnit renderSizeUnit) → void
Sets the MapMarker3DModel asset to be displayed as location indicator for a specified type.
toString() → String
A string representation of this object.
inherited
updateLocation(Location location) → void
Updates the indicator to a new location.
updateLocationAndCamera(Location location, MapCameraUpdate cameraUpdate) → void
Updates the indicator to a new location and applies a camera update at the same time.

Operators

operator ==(Object other) → bool
The equality operator.
inherited