title: Geolocation not working on Safari 5.x on Windows 7/XP
body: <p>I am working on an app that uses the W3C standard geolocation API but I cannot for the life of me get it to work on Safari on my Windows 7 and XP PC.  It works fine on my iPad and my iPhone.  It also works perfect on Chrome (5, 6, 7 and the Canary build) and on Firefox (3.6).  I don't have a Mac so I can't test it on that.  IE doesn't support geolocation yet so that's covered too.</p>
  
  <p>I created a stripped down version and I am hosting it on the Google Apps Engine so you can have a look at the code: <a href="http://html5-geolocator.appspot.com/" rel="nofollow noreferrer">http://html5-geolocator.appspot.com/</a>  .  All the (simplified) javascript is in the html so you should be able to right-click and debug/view source.</p>
  
  <p>It is pretty much a straight conversion of the examples on the <a href="http://code.google.com/apis/maps/documentation/javascript/basics.html" rel="nofollow noreferrer">Google Map API DevGuide</a>.  Interestingly enough, the examples that Google is hosting are also NOT WORKING in Safari 5.0.x on Windows 7 (but they work fine on all those other platforms, same as my app), for example <a href="http://code.google.com/apis/maps/documentation/javascript/examples/map-geolocation.html" rel="nofollow noreferrer">http://code.google.com/apis/maps/documentation/javascript/examples/map-geolocation.html</a> exhibits exactly the same issue as my APP, no map appears, the webpage just stays grey.</p>
  
  <p>Through some debugging (alert("I am here") :-) it seems that in Safari, it does execute navigator.geolocation.getCurrentPosition(myCallback), but it never seems to reach myCallback ... as if it never returns from getCurrentPosition.  I have also seen that if I leave the browser window open overnight, when I get back to it in the morning the alert and map have appeared (though not always).  I also tried added a errorCallback navigator.geolocation.getCurrentPosition(myCallback, errorCallback) but it also never executes that, again suggesting it never returns from the getCurrentPosition call.</p>
  
  <p>Why this happens?</p>
  
  <p>EDIT:
  Just did some more testing, I added the timeout option (navigator.geolocation.getCurrentPosition(myCallback, errorCallback, {timeout: 5000});) , and indeed it it timing out all the time, no matter how high I set it so it is never returning from the Google geolocation service, but why?</p>