1
I’m creating a web localization app, using geolocation
of google maps v3
.
The problem is that when my functions work, they can’t get my location CORRETA NO Chrome do COMPUTADOR
, but when I use the browser (Chrome ) of MEU CELULAR ELE OBTÉM
.
// Read location from browser
function readLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(successFunction, errorFunction);
}
}
// Get the latitude and the longtitude
function successFunction(position) {
var lat = position.coords.latitude;
var lng = position.coords.longitude;
codeLatLng(lat, lng)
}
I thought the problem was in my code, but it’s not, because using the google localization app itself, I got the same location inaccuracy.
What would be the correct theory to justify why in my computer is found a location and in my phone is another different?
In theory: your phone provides the location with help of GPS and via browser, it infers by IP.
– Berriel
How to solve? Until a while did not have this problem with google. You tested by clicking on the link?
– Lollipop
+1 to encourage you to avoid duplicating questions and stick to the one you originally created, I recommend reading this: http://meta.pt.stackoverflow.com/q/3966/3635
– Guilherme Nascimento