Answer the question
In order to leave comments, you need to log in
How to determine the user's coordinates without requiring confirmation?
All good.
At the moment I use this method to get the current coordinates
example:
window.COORDS = [];
window.COORDS.push(78.42813734634228);
window.COORDS.push(31.775801986455917);
navigator.geolocation.getCurrentPosition(function(position){
window.COORDS[0] = position.coords.latitude;
window.COORDS[1] = position.coords.longitude;
console.log(position);
},function(){
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question