Reputation: 551
I'm using the html5 JS function navigator.geolocation
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(geoLocationSuccess, geoLocationError);
}
When I run the function on windows 7 in chrome, ff, ie10, it returns almost instantly with my location.
Now I'm testing on a new ipad with mobile safari. The iPad initially prompts if I want to allow the browser to use my location. I click yes. After about a minute the geolocationError function is called with error code 2 (location is unavailable).
Both devices are on the same wifi network and one can find the location and the other can't.
I've read mobile safari supports the geolocation function. Am I doing something wrong?
Upvotes: 0
Views: 214
Reputation: 874
This looks like a bug in iOS 6 according to this Apple Support thread; geolocation doesn't work with iOS 6 web apps!
Upvotes: 1