SimulatorLocationSource

class SimulatorLocationSource(session: CoreSession, options: SimulationOptions = SimulationOptions()) : LocationSource

A LocationSource that replays a predefined set of coordinates to simulate user movement.

Constructors

Link copied to clipboard
constructor(session: CoreSession, options: SimulationOptions = SimulationOptions())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val attitudes: Flow<Attitude>

A stream of device attitude (heading) updates emitted by the source.

Link copied to clipboard
open override val coordinates: Flow<Coordinate>

A stream of user location updates emitted by the source.

Link copied to clipboard
open override val errors: Flow<Throwable>

A stream of errors emitted by the source.

Link copied to clipboard
open override var isStarted: Boolean

Indicates whether the location source is started.

Link copied to clipboard
open override val supportsAttitude: Boolean

Indicates whether the location source supports attitude.

Functions

Link copied to clipboard
open override fun deinit()

Releases the resources held by the simulator.

Link copied to clipboard
fun reset()

Cancels the simulation and clears the current samples.

Link copied to clipboard
fun setCoordinates(coordinates: List<Coordinate>, options: SimulationOptions? = null, sample: Boolean = true)

Sets the coordinates to simulate and starts the simulation.

Link copied to clipboard
fun setItinerary(itinerary: Itinerary, options: SimulationOptions? = null)

Sets the itinerary to simulate and starts the simulation.

Link copied to clipboard
open override fun start()

Starts the location source.

Link copied to clipboard
open override fun stop()

Stops the location source.