I am trying to use getCurrentPosition
to fetch the current latitude and longitude however it's not working in Mozilla. My Mozilla browser version is 62.0.3. Can anyone please help me out with this? Is there any alternative way?
function getLocation() {
var locationOptions = {};
locationOptions = {
enableHighAccuracy: false
};
if (navigator.geolocation) {
navigator.geolocation && navigator.geolocation.getCurrentPosition(success, error, locationOptions);
} else {
console.log("Geolocation is not supported by this browser.");
}
}
Comments
Post a Comment