Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

getCurrentPosition not working in mozilla 60.2 + version

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