MapMatchedLocationProvider

Deprecated

This will be removed 6 months after the next release.

Replace with

Please use `MapMatchedLocationProviderFactory.create` method to create instance of `LocationProvider` instead

Location provider that provides map matched locations generated by TomTomNavigation. Clients should call addOnLocationUpdateListener to register for location updates. If usePredictions will be set to true it will provide matched locations from the MapMatchingResult.locationPredictions otherwise the MapMatchingResult.matchedLocation will be used. Locations that comes from predictions are generated more often and attempt to provide closer approximation of user's location. Location updates from predictions will be executed before given GeoLocation.time to let client e.g. execute animation beforehand.

Constructors

Link copied to clipboard
constructor(navigation: TomTomNavigation, usePredictions: Boolean = true)

Properties

Link copied to clipboard
open override val lastKnownLocation: GeoLocation?

The last known location, or null if no location has been determined yet.

Functions

Link copied to clipboard

Adds an OnLocationUpdateListener which informs about new GeoLocation each time a location change occurs.

Link copied to clipboard
open override fun close()

Closes the object and removes all registered listeners. After closing, any function call to this object will throw an IllegalStateException.

Link copied to clipboard
open override fun disable()

Disables the location provider.

Link copied to clipboard
open override fun enable()

Enables the location provider.

Link copied to clipboard

Removes previously registered OnLocationUpdateListener.