Windows 8 Location Services

Posted by ryanabr on Geeks with Blogs See other posts from Geeks with Blogs or by ryanabr
Published on Mon, 04 Jun 2012 15:01:14 GMT Indexed on 2012/06/04 22:41 UTC
Read the original article Hit count: 177

Filed under:

 

I spent the afternoon with the Geolocator object in the WinRT and Widows 8 platform. I have also been working with doing Windows Phone 7 development, and first had to wrap my head around the fact that while similar, it is not the same as the GeoCoordinateWatcher that environment. I found a nice example here

http://code.msdn.microsoft.com/windowsapps/Geolocation-2483de66

But the behavior of my app wasn’t the same. Once you ensure that location services is enabled by following these instructions:

http://msdn.microsoft.com/en-us/library/windows/desktop/hh768219.aspx

Location Services was still disabled. From everything I read, it sounded like the first time you try to use the Geolocator object, the user would be prompted to allow to “Access to your location”. After nosing around I found the issue. You need to add the location service as a Capability in the Package.appxmanifest file:

LocationSetting

After checking the box, I was prompted to allow access to location services as expected the first time I needed to use it.

© Geeks with Blogs or respective owner