interface LocationSource
Interface that provides location data, typically to a TomtomMap object. A TomtomMap has a built-in location provider, however, it can be replaced with custom one that implements this interface.
abstract fun activate(): Unit
Activates the provider. The provider will notify the listener periodically, until the user calls deactivate(). |
|
abstract fun addLocationUpdateListener(locationUpdateListener: LocationUpdateListener!): Unit
Adds location update listener. |
|
abstract fun deactivate(): Unit
Deactivates this provider. The provider does not send any location notifications. |
|
abstract fun getAllLocationUpdateListeners(): MutableList<LocationUpdateListener!>!
Obtains the list of all added location update listeners. |
|
abstract fun getLastKnownLocation(): Location?
Last valid location of the user. The value can be null. |
|
abstract fun onLocationChanged(location: Location!): Unit
Is called when new location is found by the corresponding location source provider. |
|
abstract fun removeAllLocationUpdateListeners(): Unit
Removes all location update listeners. |
|
abstract fun removeLocationUpdateListener(locationUpdateListener: LocationUpdateListener!): Unit
Removes location update listener. |
abstract class AbstractLocationSource : LocationSource, LocationListener
Base class for all LocationSources. It contains the listeners list and propagate onLocationChange events to added listeners. |
|
open class FusedLocationSource : LocationCallback, LocationSource, ConnectionCallbacks, OnConnectionFailedListener, Contextable
Default location source implementation. It is based on FusedLocationService provided by Google. When no custom location source is provided, map is using it to get the user location. It uses {LocationUpdateListener} to notify about new location updates. |