Windows Dev Center

EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

Geolocator.DesiredAccuracyInMeters | desiredAccuracyInMeters property

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

Syntax


public:
property IReference<unsigned int>^ DesiredAccuracyInMeters { 
   IReference<unsigned int>^ get();
   void set (IReference<unsigned int>^ value);
}

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.

When neither DesiredAccuracyInMeters or DesiredAccuracy are set, your app will use an accuracy setting of 500 meters (which corresponds to the default DesiredAccuracy setting). Setting DesiredAccuracy to Default or High indirectly sets DesiredAccuracyInMeters to 500 or 10 meters, respectively. When your app sets both DesiredAccuracy and DesiredAccuracyInMeters, your app will use the accuracy value that was set last.

Note  Some hardware may not support high accuracy location data. If your app attempts to set accuracy to a value that’s not supported, accuracy will be set to the limit that the hardware supports.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Capabilities

Requirements (Windows 8.x and Windows Phone 8.x)

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

 

 

Mostrar:
© 2015 Microsoft