Precision problem in Geolocation maps V3

Asked

Viewed 527 times

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.

LINK TO GOOGLE APP

What would be the correct theory to justify why in my computer is found a location and in my phone is another different?

  • 1

    In theory: your phone provides the location with help of GPS and via browser, it infers by IP.

  • How to solve? Until a while did not have this problem with google. You tested by clicking on the link?

  • +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

2 answers

1

There is no accuracy at all, googlemaps is a tool that always works being improved and updated data, but understand that this is at a global level and even being one of the largest companies in the world with satellite and everything else yes it is necessary that someone update this data.

Places that usually have more precision are the most populous and even so there is no way to update all, the GPS as you say it increases the accuracy precisely because it works differently, it works GPS device with the GPS signal "directly", already on Desktop computers with Web applications the process is all online and sends the data that is possible to locate, but still works with a "database" and will hardly be as accurate.

In my city (corrected at the end of 2015) there was a house numbering error in Googlemaps of approximately 4km, the numbering at half of the main avenue was number 6000 (small town) and went up to 8000, but within these four kilometers the 6000 starts twice, some people in the company used Streetview to guide themselves, but ended up getting lost, this is because who updates is Google and so has nothing to do on the side of your application.

However some readings may interest you:

  • So I must abandon my idea of Web applications on Desktop computers to get geolocation?

  • @Lollipop not at all I meant this, I mean that unfortunately we are limited and this maybe you should pass on in message form to the end user, warning that Desktop has no way of being accurate. Do you think so with me, the user feeds the application data? If yes, you can give the user option to adjust the location, it is an idea that can help.

0

Simple, the current cell phones are provided with GPS devices (Global Position System) which enable the software to obtain an accurate position of the individual.

On a computer where in most cases the GPS device makes itself absent the location is made through the user’s IP address and considering that through the IP where you can only discover the individual’s region inaccurately.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.