Geolocator.DesiredAccuracyInMeters | desiredAccuracyInMeters property

Applies to Windows and Windows Phone

Gets or sets the desired accuracy in meters for data returned from the location service.

Syntax


var desiredAccuracyInMeters = geolocator.desiredAccuracyInMeters;
geolocator.desiredAccuracyInMeters = desiredAccuracyInMeters;

Property value

Type: IReference<UInt32> [JavaScript/C++] | System.Nullable<UInt32> [.NET]

The desired accuracy in meters for data returned from the location service.

Remarks

The DesiredAccuracyInMeters property provides more granularity and control of the accuracy of the position results. Most applications can simply use the DesiredAccuracy property.

  • Applies to Windows

Note  

On Windows, when the value is non-null, this property overrides the DesiredAccuracy property. When DesiredAccuracyInMeters is greater than or equal to 100 meters, then DesiredAccuracy will be set to Default. When DesiredAccuracyInMeters is less than 100 meters, then DesiredAccuracy will be set to High. Note that this may change in future when additional geolocation hardware is available. Setting the value to null will cause an exception.

Note  

On Windows Phone, when the value is non-null, this property overrides the DesiredAccuracy property. The Geolocator will set the Accuracy property of Geocoordinate instances it creates to the value of this property. Values close to zero are unrealistic for current hardware.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

Namespace

Windows.Devices.Geolocation
Windows::Devices::Geolocation [C++]

Metadata

Windows.winmd

Capabilities

ID_CAP_LOCATION [Windows Phone]

See also

Geolocator

 

 

Show:
© 2014 Microsoft