Skip To Content ArcGIS for Developers Sign In Dashboard

SimulatedLocationDataSource QML Type

A simulated location data source object. More...

Import Statement: import Esri.ArcGISRuntime 100.8
Since: Esri.ArcGISRuntime 100.8





Detailed Description

This object can be used to simulate the updating of a device's location. It iterates over a list of Location objects that will passed into AbstractLocationDataSource::updateLocation. The locations list can be set from:

  • Vertices in a polyline.
  • Automatically generated along a polyline based on a velocity.
  • Set directly via a list of locations.

Property Documentation

currentLocationIndex : int

The index of the item in the the locations list that is currently being used.

This represents the index of the location that will be passed into AbstractLocationDataSource::updateLocation. This can be used to either find which item in the SimulatedLocationDataSource::locations list is being used, or it can be used to forward/rewind/loop to a different item in the SimulatedLocationDataSource::locations list.

iterationRate : double

The rate at which the SimulatedLocationDataSource::locations is iterated over (default is 1.0).

The rate at which the locations are iterated over, controlling the time between calls to AbstractLocationDataSource::updateLocation.

The default value is 1.0, which calls AbstractLocationDataSource::updateLocation once a second. To speedup set this property to a higher value, e.g. 2.0 = 2x speedup. To slowdown set this property to a lower value, e.g. 0.5 = 2x slowdown. This property does not affect the time property of the items in the SimulatedLocationDataSource::locations (they are always 1 second).

locations : list<Location>

A list of location objects.

For each location in the list the AbstractLocationDataSource::updateLocation will be fired. The rate at which the AbstractLocationDataSource::updateLocation is called is based on SimulatedLocationDataSource::iterationRate.

The list can be populated by calling SimulatedLocationDataSource::setLocationsWithPolyline or by directly setting Location objects in a list.

Signal Documentation


Emitted when the currentLocationIndex property changes.


Emitted when the iterationRate property changes.


Emitted when the locations property changes.

Method Documentation

void setLocationsWithPolyline(Polyline polyline)

Sets the locations using vertices from the input polyline.

The result locations can be obtained from SimulatedLocationDataSource::locations. These properties will be populated based on the inputs: Location::timestamp, Location::position, Location::velocity,

These properties will be calculated based on the inputs: Location::course

These properties will not be set: Location::horizontalAccuracy, Location::verticalAccuracy, Location::lastKnown.

  • polyline - The polyline

void setLocationsWithPolylineAndParameters(Polyline polyline, SimulationParameters simulationParameters)

Sets the locations using density points on input polyline depend on velocity.

Distance between each location on the polyline depends on velocity. For example if velocity is 10 m/s then distance between 2 locations will be 10 meters. The Location::timestamp values will always be 1 second apart. These properties will be set based on the inputs: Location::timestamp, Location::position, Location::velocity, Location::horizontalAccuracy, Location::verticalAccuracy These properties will be calculated based on the inputs: Location::course These properties will not be set: Location::lastKnown.

  • polyline - The polyline
  • simulationParameters - The parameters used in creating the locations from the polyline

Feedback on this topic?