I have opened up the "layout.js" file from the javascript folder and just added the below code to the end of the file. It didn't work. Any ideas? Am I using the correct code?
//one time snapshot
navigator.geolocation.getCurrentPosition(
processGeolocation,
//optional settings below
geolocationError,
{
timeout: 0,
enableHighAccuracy: true,
maximumAge: Infinity
}
);
//Tracking user position
watchID = navigator.geolocation.watchPosition(
processGeolocation,
//Optional settings below
geolocationError,
{
timeout: 0,
enableHighAccuracy: true,
maximumAge: Infinity
}
);