LocationController

interface LocationController

Controls location-specific features and properties of the map related to the location provided by the LocationEngine abstraction.

Important: This is a Public Preview API. It may be changed or removed at any time.

Functions

Link copied to clipboard
abstract fun addOnLocationMarkerClickListener(listener: OnLocationMarkerClickListener)

Registers OnLocationMarkerClickListener that will be notified about the click (aka tap) gesture recognized on the location marker. Both, the clicked position on the screen and the underlying location on the map, become parameters of the OnLocationMarkerClickListener.onLocationMarkerClick callback.

Link copied to clipboard
abstract fun disableLocationMarker()

Disables the location marker so it becomes inactive and invisible.

Link copied to clipboard
abstract fun enableLocationMarker(options: LocationMarkerOptions)

Enables the location marker based on the supplied LocationMarkerOptions, replacing any existing location marker already visible. The location marker visualizes the users location on the map and can be of three types: CHEVRON: A vehicle position indicator primarily for use in turn-by-turn guidance. POINTER: A user location pointer, primarily for use in browsing or pedestrian modes. CUSTOM: A customizable model supplied by the developer.

Link copied to clipboard
abstract fun getLocationEngine(): LocationEngine?

Gets the currently set LocationEngine or returns null if none is set.

Link copied to clipboard
abstract fun removeOnLocationMarkerClickListener(listener: OnLocationMarkerClickListener)
Link copied to clipboard
abstract fun setLocationEngine(engine: LocationEngine)

Sets new LocationEngine. Location marker position is then set based on updates that are received from that engine.

Properties

Link copied to clipboard
abstract val currentLocation: GeoLocation?

Describes the latest available (last known) GeoLocation of the device. The value may be null when the LocationEngine has never updated the current location. For example, it may be be caused by invalid GPS Fix being deliver to the device.

Link copied to clipboard
abstract val isCurrentLocationInMapBoundingBox: Boolean

Flag determining whether the current location marker is located within the visible area of the screen.

Link copied to clipboard
abstract var locationAccuracyPolicy: LocationAccuracyPolicy

Determines if the location is accurate enough for the user to rely on. The default is for locations with an accuracy of more then 50 meters to be treated as unreliable.

Inheritors

Link copied to clipboard