MMKLocationSimulator

class MMKLocationSimulator : MMKLocationManager

Simulates the device location.

Summary

Instance methods

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

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

func startSimulation(with simulationAccuracy: MMKSimulationAccuracy)
Start simulation

func stopSimulation()
Stop simulation

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

func setLocationSpeedProvidingWithProvide(_ provide: Bool)
Fill location::Location::speed

Properties

var geometryMMKPolyline? { get set }
The polyline describing the location

var speed: Double { get set }
Movement speed

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

Instance methods

subscribeForSimulatorEvents(with:)

func subscribeForSimulatorEvents(with simulatorListener: 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: 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(with:)

func startSimulation(with simulationAccuracy: MMKSimulationAccuracy)

Start simulation.

Parameters

simulationAccuracy

Generate locations with given accuracy.


stopSimulation()

func stopSimulation()

Stop simulation.


polylinePosition()

func polylinePosition() -> MMKPolylinePosition

The position of the polyline.


setLocationSpeedProvidingWithProvide(_:)

func setLocationSpeedProvidingWithProvide(_ provide: Bool)

Fill location::Location::speed.


Properties

geometry

var geometry: MMKPolyline? { get set }

The polyline describing the location.

Optional property, can be nil.


speed

var speed: Double { get set }

Movement speed.


isActive

var isActive: Bool { get }

True if simulator is not suspended.