Interface LocationSimulator

Package com.yandex.mapkit.location

All Superinterfaces:

LocationManager

interface LocationSimulator extends LocationManager

Simulates the device location.

Summary

Methods

Type and modifiers

Method and Description

Polyline

getGeometry()

void

setGeometry(@Nullable Polyline geometry)

double

getSpeed()

void

setSpeed(double speed)

java.util.List<SimulationSettings>

getSettings()

void

setSettings(@NonNull java.util.List<SimulationSettings> settings)

void

subscribeForSimulatorEvents(@NonNull LocationSimulatorListener simulatorListener)
Subscribes to simulation events.

void

unsubscribeFromSimulatorEvents(@NonNull LocationSimulatorListener simulatorListener)
Unsubscribes from simulation events.

void

startSimulation(@NonNull SimulationAccuracy simulationAccuracy)
Start simulation.

void

stopSimulation()
Stop simulation.

PolylinePosition

polylinePosition()
The position of the polyline.

boolean

isActive()
True if simulator is not suspended.

void

setLocationSpeedProviding(boolean provide)

Methods

getGeometry

@Deprecated @Nullable
Polyline getGeometry()

Alert

Now field in SimulationSettings settings. The polyline describing the location.

Optional property, can be null.


setGeometry

@Deprecated
void setGeometry(@Nullable Polyline geometry)


getSpeed

@Deprecated
double getSpeed()

Alert

Now field in settings. Movement speed.


setSpeed

@Deprecated
void setSpeed(double speed)


getSettings

@NonNull
java.util.List<SimulationSettings> getSettings()


setSettings

void setSettings(@NonNull java.util.List<SimulationSettings> settings)


subscribeForSimulatorEvents

void subscribeForSimulatorEvents(@NonNull LocationSimulatorListener simulatorListener)

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

void unsubscribeFromSimulatorEvents(@NonNull LocationSimulatorListener simulatorListener)

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

void startSimulation(@NonNull SimulationAccuracy simulationAccuracy)

Start simulation.

Parameters

simulationAccuracy

Generate locations with given accuracy.


stopSimulation

void stopSimulation()

Stop simulation.


polylinePosition

@NonNull
PolylinePosition polylinePosition()

The position of the polyline.


isActive

boolean isActive()

True if simulator is not suspended.


setLocationSpeedProviding

@Deprecated
void setLocationSpeedProviding(boolean provide)

Alert

Use simulatorSettings.locationSettings.speed.enabled. Fill location::Location::speed.