SimulatedLocationDataSource class final

A location data source that provides simulated device locations for testing.

Use this data source to simulate location updates for a device. It uses a collection of ArcGISLocation that are sequentially passed to LocationDataSource.updateLocation. The location collection can be derived from vertices in a provided polyline, generated evenly along a polyline based on a travel velocity, or assigned to the collection directly.

Inheritance

Constructors

SimulatedLocationDataSource.new()
Creates a simulated location data source.
factory
SimulatedLocationDataSource.withLocations(List<ArcGISLocation> locations)
Creates a simulated location data source with the specified locations.
factory
SimulatedLocationDataSource.withPolylineAndSimulationParameters(Polyline polyline, {SimulationParameters? parameters})
Creates a simulated location data source which derives its collection of locations along an input polyline, optionally based on simulation parameters.
factory

Properties

currentLocationIndex ↔ int
The index of the item in the location collection that provides the current location.
getter/setter pair
error → ArcGISException?
An error that describes a problem encountered while starting or running the LocationDataSource.
no setterinherited
exception → Exception?
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
iterationRate ↔ double
The rate over which the SimulatedLocationDataSource.locations collection is iterated.
getter/setter pair
locations → List<ArcGISLocation>
A collection of locations that are iterated sequentially.
no setter
onErrorChanged → Stream<ArcGISException?>
Indicates that the LocationDataSource.error property has changed.
no setterinherited
onExceptionChanged → Stream<Exception?>
no setterinherited
onHeadingChanged → Stream<double>
Set the heading changed callback function for the location data source.
no setterinherited
onLocationChanged → Stream<ArcGISLocation>
Set the location changed callback function for the location data source.
no setterinherited
onStatusChanged → Stream<LocationDataSourceStatus>
Set the status changed callback function for the location data source.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → LocationDataSourceStatus
The current status of the location data source.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLocationsWithPolyline(Polyline polyline, {SimulationParameters? simulationParameters}) → void
Creates a collection of locations along an input polyline based on simulation parameters.
start() → Future<void>
Starts the location data source asynchronously and prepares to begin receiving location updates.
inherited
stop() → Future<void>
Stops the location data source asynchronously.
inherited
toString() → String
A string representation of this object.
inherited
updateHeading(double heading) → void
Updates the current heading angle, in degrees clockwise, relative to north.
inherited
updateLocation(ArcGISLocation location) → void
Updates the position of the current location.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited