Show / Hide Table of Contents

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
Object
LocationDataSource
IndoorsLocationDataSource
NmeaLocationDataSource
RouteTrackerLocationDataSource
SimulatedLocationDataSource
SystemLocationDataSource
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Esri.ArcGISRuntime.Location
Assembly: Esri.ArcGISRuntime.dll
Syntax
public abstract class LocationDataSource

Constructors

Name Description
LocationDataSource()

Initializes a new instance of the LocationDataSource class.

Properties

Name Description
Error

Gets an 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 location tracking

StopAsync()

Stops location tracking

UpdateHeading(Double)

Updates the current heading

UpdateLocation(Location)

Updates 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

SystemLocationDataSource

Applies to

TargetVersions
.NET Standard 2.0100.3 - 100.14
.NET 6.0100.13 - 100.14
.NET 6.0 Windows100.13 - 100.14
.NET Framework100.0 - 100.14
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.14
Xamarin.iOS100.0 - 100.14
UWP100.0 - 100.14

Relevant samples

Display device location: Display your current position on the map, as well as switch between different types of auto pan Modes.
Find place: Find places of interest near a location or within a specific area.
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 © 2021 Esri.