I use the gwt Geolocation-Package (com.google.gwt.geolocation.client.Geolocation) to read the current Location on a gwt client.
All woks fine on iPhone, iPad, Android and the Chrome-Browser on desktop.
But when I use it on Safari (5.1.2) on desktop, the Safari asks if he can use the position. When I click “Allow” I get a PositionError with errorCode 2 (POSITION_UNAVAILABLE).
Has anyone else this problem/solved it?
If you’re using a wired connection, that’s why. Safari 5 apparently returns an error when
navigator.geolocationis used on a wired connection. To test it out, open the console in Safari 5 and try this:Basically, the Geolocation package is just a wrapper for HTML5’s geolocation functionality. In this case, the functionality fails and you get a
PositionError.