Show / Hide Table of Contents

Class SimulatedLocationDataSource

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

Inheritance
System.Object
LocationDataSource
SimulatedLocationDataSource
LocationDataSource.CreateDefault()
LocationDataSource.StartAsync()
LocationDataSource.StopAsync()
LocationDataSource.UpdateHeading(Double)
LocationDataSource.UpdateLocation(Location)
LocationDataSource.Status
LocationDataSource.Error
LocationDataSource.LocationChanged
LocationDataSource.HeadingChanged
LocationDataSource.StatusChanged
LocationDataSource.ErrorChanged
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Esri.ArcGISRuntime.Location
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class SimulatedLocationDataSource : LocationDataSource
Remarks

Use this data source to simulate location updates for a device. It uses a collection of Location objects that are sequentially passed to UpdateLocation(Location). 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.

Constructors

Name Description
SimulatedLocationDataSource()

Initializes a new instance of the SimulatedLocationDataSource class.

Properties

Name Description
CurrentLocationIndex

Gets or sets the index of the item in the Locations collection that provides the current location.

IterationRate

Gets or sets the rate over which the Locations collection is iterated.

Locations

Gets or sets a collection of Locations that are iterated sequentially.

Methods

Name Description
OnStartAsync()

Called when location tracking has started

OnStopAsync()

Called when location tracking has stopped

SetLocationsWithPolyline(Polyline)

Creates a collection of locations using vertices from an input Polyline.

SetLocationsWithPolyline(Polyline, SimulationParameters)

Creates a collection of locations along an input Polyline based on simulation parameters.

Applies to

TargetVersions
.NET Standard 2.0100.8 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.8 - 200.7
Xamarin.Android100.8 - 100.15
Xamarin.iOS100.8 - 100.15
UWP100.8 - 200.7

Relevant samples

Navigate route: Use a routing service to navigate between points.
Show location history: Display your location history on the map.
In This Article
Back to top Copyright © 2022 Esri.