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.