YMKLocationSimulator

class YMKLocationSimulator : YMKLocationManager

Simulates the device location.

Summary

Instance methods

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

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

func startSimulation(with simulationAccuracy: YMKSimulationAccuracy)
Start simulation

func stopSimulation()
Stop simulation

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

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

Properties

var geometryYMKPolyline? { 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: YMKLocationSimulatorListener)

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: YMKLocationSimulatorListener)

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: YMKSimulationAccuracy)

Start simulation.

Parameters

simulationAccuracy

Generate locations with given accuracy.


stopSimulation()

func stopSimulation()

Stop simulation.


polylinePosition()

func polylinePosition() -> YMKPolylinePosition

The position of the polyline.


setLocationSpeedProvidingWithProvide(_:)

func setLocationSpeedProvidingWithProvide(_ provide: Bool)

Fill location::Location::speed.


Properties

geometry

var geometry: YMKPolyline? { 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.


Предыдущая
Следующая