Class LocationDataSource
A base class for location information.
The datasource can be used with the LocationDisplay and displayed on a map
using the MapView's
LocationDisplay
property.
Inheritance
Namespace: Esri.ArcGISRuntime.Location
Assembly: Esri.ArcGISRuntime.dll
Syntax
public abstract class LocationDataSource
Remarks
This is a base class for a number of different location data sources, such as IndoorsLocationDataSource, NmeaLocationDataSource, RouteTrackerLocationDataSource, and SimulatedLocationDataSource. Call StartAsync() to receive location updates and display the current location using the LocationDisplay.
Constructors
Name | Description |
---|---|
LocationDataSource() | Initializes a new instance of the LocationDataSource class. |
Properties
Name | Description |
---|---|
Error | Gets an System.Exception that describes a problem encountered while starting or running the LocationDataSource. |
Status | Gets the current status of the location datasource. |
Methods
Name | Description |
---|---|
CreateDefault() | Creates a default location datasource using the system location. |
OnStartAsync() | Called when location tracking has started |
OnStopAsync() | Called when location tracking has stopped |
StartAsync() | Starts the location data source asynchronously and prepares to begin receiving location updates. |
StopAsync() | Stops location tracking. |
UpdateHeading(Double) | Updates the current heading angle, in degrees clockwise, relative to north. |
UpdateLocation(Location) | Updates the position of the current location. |
Events
Name | Description |
---|---|
ErrorChanged | Indicates that the Error property has changed. |
HeadingChanged | Raised when the compass heading has changed. |
LocationChanged | Raised when the location data source has a new location. |
StatusChanged | Raised when the data source status has changed. |
See Also
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |