I
I
Ivan Kondratiev2016-03-13 14:04:55
Google Maps
Ivan Kondratiev, 2016-03-13 14:04:55

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(){

        });

Then I substitute the coordinates in Google maps for the position of the route.
The disadvantage of this method is that the user must give approval to receive his coordinates.
Question.
Can I somehow find out the user's coordinates without his approval?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question