Hodaya Shalom
Hodaya Shalom

Reputation: 4417

Finding current location by geolocation on Safari

I have a Safari browser on Windows 7,

In my site I use Geolocation to find current location

in Chrome and FireFox it works

in Safari it crashes.

I read that Safari does not support Geolocation without Wifi, is there a solution?

Upvotes: 3

Views: 4434

Answers (1)

donlaur
donlaur

Reputation: 1287

Safari on Wifi does not seem to be the most accurate method of geolocation for some people.

As to Safari crashing, you should put a timeout so that the script has a way to fail without crashing. Let it fall back to error handler.

The following might help { maximumAge: 600000, timeout: 8000 }

Also, you can test some demos first to see what results you will get with different browsers.

http://html5demos.com/geo W3C - http://dev.w3.org/geo/api/spec-source.html

It can cause problems in Safari as they use a different service. You also might need to turn on the feature to first use it. Try enabling the location services in Safari. Go to Preferences->Security and check "Allow websites to ask for location information". Also, make sure System Preferences->Security does not have "Disable Location Services" checked.

Upvotes: 3

Related Questions