Content deleted Content added
cat |
|||
Line 27:
Simple [[JavaScript]] code that checks if the browser has the Geolocation API implemented and then uses it to get the current position of the device. this code creates a function which can be called on html using <code><body onload="geoFindMe()"></code>:
<source lang="javascript">
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error, geoOptions);
} else {
Line 35:
}
console.log(
}
console.log(
}
enableHighAccuracy: true,
maximumAge: 30000,
|