Show / Hide Table of Contents

Constructor Location

Location(MapPoint, Double, Double, Double, Boolean)

Initializes a new instance of the Location class.

Declaration
public Location(MapPoint position, double horizontalAccuracy, double velocity, double course, bool isLastKnown)
Parameters
Type Name Description
MapPoint position

The horizontal and vertical map position of the location

Double horizontalAccuracy

The horizontal accuracy in meters. Positive values or NaN are supported.

Double velocity

The location's velocity in meters per second.

Double course

The location's course in degrees (clockwise), 0 being true North.

Boolean isLastKnown

If true indicates this is an outdated device position retrieved and cached earlier, and not guaranteed to represent be the current location latest. Setting this to true will render with the AcquiringSymbol, typically a grayed out location symbol.

Applies to

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

Location(Nullable<DateTimeOffset>, MapPoint, Double, Double, Double, Double, Boolean)

Initializes a new instance of the Location class with a known timestamp.

Declaration
public Location(DateTimeOffset? timestamp, MapPoint position, double horizontalAccuracy, double verticalAccuracy, double velocity, double course, bool isLastKnown)
Parameters
Type Name Description
Nullable<System.DateTimeOffset> timestamp

A timestamp when location was received.

MapPoint position

The horizontal and vertical map position of the location.

Double horizontalAccuracy

The horizontal accuracy in meters. Positive values or NaN are supported.

Double verticalAccuracy

The vertical accuracy in meters. Positive values or NaN are supported.

Double velocity

The location's velocity in meters per second.

Double course

The location's course in degrees (clockwise), 0 being true North.

Boolean isLastKnown

If true indicates this is an outdated device position retrieved and cached earlier, and not guaranteed to represent be the current location latest. Setting this to true will render with the AcquiringSymbol, typically a grayed out location symbol.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.3 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.3 - 100.15
Xamarin.iOS100.3 - 100.15
UWP100.3 - 100.14

Location(Nullable<DateTimeOffset>, MapPoint, Double, Double, Double, Double, Boolean, IEnumerable<KeyValuePair<String, Object>>)

Initializes a new instance of the Location class with timestamp and additional source properties.

Declaration
public Location(DateTimeOffset? timestamp, MapPoint position, double horizontalAccuracy, double verticalAccuracy, double velocity, double course, bool isLastKnown, IEnumerable<KeyValuePair<string, object>> additionalSourceProperties)
Parameters
Type Name Description
Nullable<System.DateTimeOffset> timestamp

A timestamp when location was received.

MapPoint position

The horizontal and vertical map position of the location.

Double horizontalAccuracy

The horizontal accuracy in meters. Positive values or NaN are supported.

Double verticalAccuracy

The vertical accuracy in meters. Positive values or NaN are supported.

Double velocity

The location's velocity in meters per second.

Double course

The location's course in degrees (clockwise), 0 being true North.

Boolean isLastKnown

If true indicates this is an outdated device position retrieved and cached earlier, and not guaranteed to represent be the current location latest. Setting this to true will render with the AcquiringSymbol, typically a grayed out location symbol.

IEnumerable<KeyValuePair<System.String, Object>> additionalSourceProperties

A set of key-value pairs providing additional meta-data and properties about the source of this location.

Remarks

A Location can be created from a variety of sources and using different technologies. By supplying AdditionalSourceProperties you can allow users of this Location to find out how the data was captured.

Information is provided as a set of key-value pairs, where the Location key describes the type of data held in the Object value. Values must be basic data types such as string, numeric, boolean or date. The creator of the Location can use any string for the key - but the Runtime SDK recognizes a number of well known keys which should be used if available. See LocationSourcePropertyKeys:

  • floor (an integer value). The floor number of the Location when in a building. Use Floor to reference this key.
  • satelliteCount (an integer value). The number of satellites used to fix the Location. Use SatelliteCount to reference this key.
  • positionSource (a string value). This key can be used to indicate the position source: GNSS, AppleIPS, BLE, WIFI, CELL, IP. Where GNSS indicates global navigation satellite system and AppleIPS is Apple’s indoor positioning technology. It is possible to have multiple position sources. In that case positionSource is a list with comma-separated values. Use PositionSource to reference this key.

Keys are case-sensitive.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.10 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.10 - 100.12
Xamarin.Android100.10 - 100.15
Xamarin.iOS100.10 - 100.15
UWP100.10 - 100.14
In This Article
Back to top Copyright © 2022 Esri.