Windows Dev Center

Geolocator.Geolocator constructor

Initializes a new Geolocator object.

Syntax


public:
Geolocator()

Parameters

This constructor has no parameters.

Remarks

Important  Starting in Windows 10 Insider Preview, call the RequestAccessAsync method while your app is in the foreground and before accessing the user’s location. Until the user grants your app permission to their location, your app can't access location data.

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

location
ID_CAP_LOCATION [Windows Phone]

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

Minimum supported client

Windows 8

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

Capabilities

location
ID_CAP_LOCATION [Windows Phone]

See also

Geolocator
geolocation sample

 

 

Show:
© 2015 Microsoft