Interface LocationSimulator
Package com.yandex.mapkit.location
All Superinterfaces:
interface LocationSimulator extends LocationManager
Simulates the device location.
Summary
Methods
Type and modifiers |
Method and Description |
void |
setGeometry(@Nullable Polyline geometry) |
double |
getSpeed() |
void |
setSpeed(double speed) |
java.util.List<SimulationSettings> |
|
void |
setSettings(@NonNull java.util.List<SimulationSettings> settings) |
void |
subscribeForSimulatorEvents(@NonNull LocationSimulatorListener simulatorListener) |
void |
unsubscribeFromSimulatorEvents(@NonNull LocationSimulatorListener simulatorListener) |
void |
startSimulation(@NonNull SimulationAccuracy simulationAccuracy) |
void |
stopSimulation() |
polylinePosition() |
|
boolean |
isActive() |
void |
setLocationSpeedProviding(boolean provide) |
Methods
getGeometry
@Deprecated @Nullable |
Alert
Now field in SimulationSettings settings. The polyline describing the location.
Optional property, can be null.
setGeometry
@Deprecated |
getSpeed
@Deprecated |
Alert
Now field in settings. Movement speed.
setSpeed
@Deprecated |
getSettings
@NonNull |
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 |
|
|
Generate locations with given accuracy. |
stopSimulation
void stopSimulation() |
Stop simulation.
polylinePosition
@NonNull |
The position of the polyline.
isActive
boolean isActive() |
True if simulator is not suspended.
setLocationSpeedProviding
@Deprecated |
Alert
Use simulatorSettings.locationSettings.speed.enabled. Fill location::Location::speed.