I'm creating a location web app, using geolocation
of google maps v3
.
The problem is that when my functions work, they can not get my location CORRETA NO Chrome do COMPUTADOR
, but when I use the MEU CELULAR ELE OBTÉM
browser.
// 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 is not, because when I use Google's own location app, I get the same inaccuracy of location.
What would be the correct theory to justify why a location is found in my computer and in my cell phone it is a different one?