ReplayLocationProvider

class ReplayLocationProvider(mapboxReplayer: MapboxReplayer) : LocationProvider, ReplayEventsObserver

Location Provider for replaying route history.

Constructors

Link copied to clipboard
fun ReplayLocationProvider(mapboxReplayer: MapboxReplayer)

Functions

Link copied to clipboard
open override fun addLocationObserver(observer: LocationObserver)

Registers an observer in this instance of LocationProvider. One instance of LocationProvider can have more than one observer. If you add the same observer twice, it will only be invoked once.

open override fun addLocationObserver(observer: LocationObserver, looper: Looper)

Registers an observer that will be invoked on a specific looper in this instance of LocationProvider. One instance of LocationProvider can have more than one observer. If you add the same observer twice (even with different loopers or if the looper wasn't set), it will only be invoked once on the latest looper that was passed.

Link copied to clipboard
open override fun getLastLocation(callback: GetLocationCallback): Cancelable

Gets the last known location. This call will never activate hardware to obtain a new location, and will only return a cached location.

Link copied to clipboard
open override fun removeLocationObserver(observer: LocationObserver)

Removes the observer from this instance of LocationProvider. If the observer is not registered, this is no-op.

Link copied to clipboard
open override fun replayEvents(replayEvents: List<ReplayEventBase>)

Called with all events that occurred within a time window during replay