Answers for "navigator.geolocation.getCurrentPosition(console.log,console.log) undefined"

0

navigator.geolocation.getCurrentPosition(console.log,console.log) undefined

var options = {
  enableHighAccuracy: true,
  timeout: 5000,
  maximumAge: 0
};

function success(pos) {
  var crd = pos.coords;

  console.log('Your current position is:');
  console.log(`Latitude : ${crd.latitude}`);
  console.log(`Longitude: ${crd.longitude}`);
  console.log(`More or less ${crd.accuracy} meters.`);
}

function error(err) {
  console.warn(`ERROR(${err.code}): ${err.message}`);
}

navigator.geolocation.getCurrentPosition(success, error, options);
Posted by: Guest on July-15-2020
0

navigator.geolocation.getCurrentPosition(console.log,console.log) undefined

navigator.geolocation.getCurrentPosition(success[, error[, [options]])
Posted by: Guest on July-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language