0

This is the code i am using for getting locations. But unfortunately it prints "failure call back " always.

 var location_timeout = setTimeout(function(){alert('failed');}, 10000);
        navigator.geolocation.getCurrentPosition(function(position) {
            findInStore.isGeoLocationPos = position;
            clearTimeout(location_timeout);
            alert('Succ call back')
            findInStore.onDirectionLocation(event);
        },function(){clearTimeout(location_timeout);
        alert('failure call back');}); 

Try

 http://stackoverflow.com/questions/7350033/geolocation-not-working-in-safari
 http://stackoverflow.com/questions/3397585/navigator-geolocation-getcurrentposition-sometimes-works-sometimes-doesnt

and few more. But none helps. getCurrentPosition call fails. Any suggestions? I am not good at this.

Gibbs
  • 21,904
  • 13
  • 74
  • 138

1 Answers1

0

Turn Wifi on on your computer and it will work. Safari use wifi to geolocalize your computer :-)

Potsky
  • 328
  • 2
  • 9