MMKLocationSimulator
Simulates the device location.
Summary
Instance methods
func subscribeForSimulatorEvents(with simulatorListener: MMKLocationSimulatorListener) |
func unsubscribeFromSimulatorEvents(with simulatorListener: MMKLocationSimulatorListener) |
func startSimulation(with simulationAccuracy: MMKSimulationAccuracy) |
func stopSimulation() |
func polylinePosition() -> MMKPolylinePosition |
func setLocationSpeedProvidingWithProvide(_ provide: Bool) |
Properties
var geometry: MMKPolyline? { get set } |
var speed: Double { get set } |
var isActive: Bool { get } |
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.