Show / Hide Table of Contents

Class LocationDisplay

Defines how location is displayed on a MapView.

Inheritance
System.Object
LocationDisplay
Implements
System.ComponentModel.INotifyPropertyChanged
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Esri.ArcGISRuntime.UI
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class LocationDisplay : INotifyPropertyChanged
Remarks

Location display can retrieve the device's current location from a LocationDataSource and display it on top of a Map. As the device moves, the map view can respond to new locations by updating the position of the location symbol on the display. It can also set the viewpoint when an updated location is received, or automatically pan and rotate the map when the current location, heading, or course changes.

Each MapView has its own instance of LocationDisplay so you don't have to explicitly instantiate the location display. The location information is provided by a LocationDataSource. The current position of the device is provided by default from the operating system. To start receiving location updates, and display the current location, you must start the location display's data source.

Apart from the device operating system's built-in location, you can also display locations from other sources, including external (high accuracy) GPS, an indoor positioning system (IPS), or simulated locations (for mocking location updates) using the following location data sources:

  • SimulatedLocationDataSource
  • NmeaLocationDataSource
  • IndoorsLocationDataSource
  • RouteTrackerLocationDataSource

By default, the location display uses a blue, round symbol to show the current location. Depending on signal strength, satellite positions, and other factors, the accuracy of the reported location can vary. An additional blue circle (AccuracySymbol) around the location symbol indicates the estimated range of accuracy for the current location. As locations are read from the configured LocationDataSource, this outer circle may contract and expand as accuracy increases or decreases. You can display further information about the location using the following symbols:

  • AcquiringSymbol
  • CourseSymbol
  • HeadingSymbol
  • PingAnimationSymbol

You can change the default symbology of these symbols to make them more visible against the underlying map cartography, increase their visibility for visually impaired users, or match an app's visual appearance.

Properties

Name Description
AccuracySymbol

Gets or sets the fill symbol indicating how accurate the current location is.

AcquiringSymbol

Gets or sets the symbol used to display the last known location while the current location is being acquired.

AutoPanMode

Gets or sets the auto pan mode which determines how location changes affect the current viewpoint.

CourseSymbol

Gets or sets the symbol used to display the current location and the course (direction of travel) when moving.

DataSource

Gets or sets the location data source used for generating location updates.

DefaultSymbol

Gets or sets the symbol used for location when not moving.

Heading

Gets the heading angle of the current location in degrees relative to north.

HeadingSymbol

Gets or sets the symbol used for the location when the auto-pan mode is CompassNavigation.

InitialZoomScale

Gets or sets the scale that the map should automatically be zoomed to upon receiving the first location update.

IsEnabled

Gets or sets a value indicating whether the location display and its datasource are enabled.

Location

Gets the most recent location reported by the location data source in the projection of the current map view.

MapLocation

Gets the map position of the most recent location reported by the location data source in the projection of the current map view

NavigationPointHeightFactor

Gets or sets the navigation point height factor.

Opacity

Gets or sets the opacity value of all symbols displayed by the LocationDisplay. The value should be between 0 and 1.

PingAnimationSymbol

Gets or sets the symbol that will be animated around the location symbol, to indicate when location updates are received.

ShowAccuracy

Gets or sets a value indicating whether to display the accuracy of the current location.

ShowLocation

Gets or sets a value indicating whether the location is shown on the MapView this instance is associated with.

ShowPingAnimationSymbol

Gets or sets a value indicating whether the ping animation is shown.

Started

Gets a value indicating whether the location display is currently active (the LocationDataSource has been started).

UseCourseSymbolOnMovement

Gets or sets a value indicating whether the CourseSymbol is used to display current location, when the location updates indicate the device is moving.

WanderExtentFactor

Gets or sets the wander extent factor controls the re-centering behavior of the MapView when the location changes.

Events

Name Description
AutoPanModeChanged

Occurs when the AutoPanMode changes

LocationChanged

Occurs when the location changes

PropertyChanged

Occurs when a property value changes

StatusChanged

Occurs when the status of the location changes

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.0 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.0 - 200.8
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.8

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 © 2022 Esri.