I am creating hybrid application which should only work in chrome .In my app am using HTML5 geolocation..this is working fine in chrome/XP but its not working in chrome/windows 7 ... While executin the below function it is requesting me to allow to use current location .I clicked "allow" but after that no respond. I could not find the actual issue.Please help me out..
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(self.showPosition);
function showPosition(position)
{
var currentLatitude = position.coords.latitude;
var currentLongitude = position.coords.longitude;
localStorage.DeviceLocation=currentLatitude+","+currentLongitude;
$("#curr_loc_target").html("<b>Current location enabled as target </b> <BR> <b>Latitude :</b> "+currentLatitude.toFixed(5)+" <b>Longitude : </b>"+currentLongitude.toFixed(5));
$("#curr_loc_target").show();
}
}
This should give you the error you are looking for. It doesn't work on my chrome win 7 and the error is user permission denied when running locally, but not when uploaded to a server. Might try getting this onto a server instead of running with the file:/// protocol. Should do the trick. Chrome is pesky about what it allows when running locally.