A simulated location data source object. More...
|void||setLocations(const QList<Location> &locations)|
|void||setLocationsWithPolyline(const Polyline &polyline)|
|void||setLocationsWithPolyline(const Polyline &polyline, SimulationParameters *simulationParameters)|
- 3 public functions inherited from Esri::ArcGISRuntime::AbstractLocationDataSource
- 31 public functions inherited from QObject
- 2 protected slots inherited from Esri::ArcGISRuntime::AbstractLocationDataSource
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 3 signals inherited from Esri::ArcGISRuntime::AbstractLocationDataSource
- 1 signal inherited from Esri::ArcGISRuntime::Object
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 4 protected functions inherited from Esri::ArcGISRuntime::AbstractLocationDataSource
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
A simulated location data source object.
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 Location.
Member Function Documentation
Creates the new instance of the data source with an optional parent.
Returns 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.
See also setCurrentLocationIndex().
Returns the rate at which the SimulatedLocationDataSource::locations is iterated over (default is
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
See also setIterationRate().
Returns 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.
See also setLocations().
Reimplemented from AbstractLocationDataSource::onStart().
Reacts to start requests by starting the simulation.
Note: You should not call this method directly - use start instead.
Reimplemented from AbstractLocationDataSource::onStop().
Reacts to stop requests by stopping the simulation.
Note: You should not call this method directly - use stop instead.
Sets the currentLocationIndex to currentLocationIndex.
See also currentLocationIndex.
Sets the iterationRate to iterationRate.
See also iterationRate.
Sets the locations to locations.
See also locations.
void SimulatedLocationDataSource::setLocationsWithPolyline(const Polyline &polyline)
Sets the locations using vertices from the input polyline.
These properties will be calculated based on the inputs: Location::course
- polyline - The polyline
void SimulatedLocationDataSource::setLocationsWithPolyline(const 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::isLastKnown.
- polyline - The polyline
- simulationParameters - The parameters used in creating the locations from the polyline