locked
How do store apps power HTML5 Geolocation? Is the accuracy comparable to IE?

    Question

  • My understanding of HTML5 geolocation is that, in the absence of GPS, it relies on the browser to do a fairly clever analysis of the network architecture combined with a couple reverse-ip lookups to get a more accurate location, and thus the accuracy is heavily dependant on the browser's implementation of that API. 

    However, I don't know how this works for Windows Store apps on devices without GPS. What's the "browser" in this scenario, and how accurate is the location detection? 

    Friday, January 31, 2014 8:08 PM

Answers

  • Hello,

    Even in the case of Windows Store apps, if the device does not have a location sensor, then you will get the same behavior as IE. Windows Store apps have a WinRT GeoLocation API which will give you the same results as the navigator.location object - when navigator.location is used from a Windows Store app perspective.

    If for example, you do not have a location sensor on your device and you disconnect your machine from the network and perform an ipconfig /flushdns, the navigator.location object will not return any location to you in a Windows Store app (or IE). However, if you have a Windows Store app with a Location sensor, and you disconnect your Internet connection, using the navigator.geolocation.getCurrentPosition() will still return you the latitude/longitude based on the Sensor data when viewed either through the Store app or IE.

    Thanks,

    Prashant.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog


    Saturday, February 1, 2014 1:44 AM
    Moderator