MMKLocationSimulator

class MMKLocationSimulator : MMKLocationManager

Simulates the device location.

Summary

Instance methods

func subscribeForSimulatorEvents(with simulatorListener: any MMKLocationSimulatorListener)
Subscribes to simulation events

func unsubscribeFromSimulatorEvents(with simulatorListener: any MMKLocationSimulatorListener)
Unsubscribes from simulation events

func startSimulation(withSettings settings: [MMKSimulationSettings])
Start simulation

func stopSimulation()
Stop simulation

func polylinePosition() -> MMKPolylinePosition
The position of the polyline

Properties

var speed: Double { get set }
Movement speed

var settings: [MMKSimulationSettings] { get set }

var isActive: Bool { get }
True if simulator is not suspended

Instance methods

subscribeForSimulatorEvents(with:)

func subscribeForSimulatorEvents(with simulatorListener: any MMKLocationSimulatorListener)

Subscribes to simulation events.

The class does not retain the object in the 'simulatorListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


unsubscribeFromSimulatorEvents(with:)

func unsubscribeFromSimulatorEvents(with simulatorListener: any MMKLocationSimulatorListener)

Unsubscribes from simulation events.

The class does not retain the object in the 'simulatorListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


startSimulation(withSettings:)

func startSimulation(withSettings settings: [MMKSimulationSettings])

Start simulation.

Parameters

settings

Generate locations with given simulation settings.


stopSimulation()

func stopSimulation()

Stop simulation.


polylinePosition()

func polylinePosition() -> MMKPolylinePosition

The position of the polyline.


Properties

speed

var speed: Double { get set }

Movement speed.

Alert

Now field in settings.


settings

var settings: [MMKSimulationSettings] { get set }


isActive

var isActive: Bool { get }

True if simulator is not suspended.