Geolocation showing incorrect location on google map

When I use http://html5demos.com/geo to find myself, it shows the wrong location (wrong city) in FF and chrome. Any reason this happens.

+7
source share
4 answers

I had the same issue with Chrome on Windows, but I got it at least for a while.

I also used the example http://html5demos.com/geo

The place was not just inaccurate, but also in the wrong city.

I tried the same example on my iPad (Safari), and that was right there. My iPad uses the same WiFi network as my computer, so I knew then that this was not a problem with my provider returning the wrong location, this is due to the browser on my PC.

I got it to show the correct location in Chrome by going to Chrome settings and clearing the cache and cookies.

It’s not enough just to select “Tools / Clear browsing data / cookies and cache” in Chrome, this only happened after I selected “Settings / Privacy / Content settings / All cookies and site data” in Chrome and deleting all cookies whether the example showed an example of the correct location.

Update 1: the next day I tried the same geolocation example, and to my annoyance, it again showed the wrong city. I tried to get it working by clearing the Chrome settings as described above, and this time this solution did not work. However, when I used the CCleaner app and the selected Cleaner / Applications and cleared all the Chrome data (internet cache, internet history, cookies and session), the geo example showed the correct location. I am using the latest version of Chrome. Let's hope that in future versions it will work more consistently.

Update 2: I tried the above procedure later and could not get it to create the correct location at all. Maybe geolocation is now returning the location of my internet service provider, rather than my location, using my IP address and Google geolocation services. Of course, this place is useless. The reason my iPad returns the correct location is probably because it contains built-in GPS. The iPad 3G / 4G has a GPS chip built into the GSM receiver chip, while WiFi models only don't have GPS. When "location services" are turned off in your iPad’s settings, your location using GPS and IP is turned off. It would be useful to simply disable GPS on my iPad and just use the IP address, but I'm not sure if this is possible.

Update 3. As I mentioned, I use a WiFi stick on my PC. I noticed that when I look at the available Wi-Fi networks (using View Available Wireless Networks), and mine is the only network, the geolocation example returns a location in another city, but if one of my neighbors has a WiFi network in the range my computer, an example of geolocation returns my exact location within a few meters. that is, the geolocation in the browser is smart enough to use this additional information to search for me.

(I think the other answer to this question entirely concerns the wrong path. The questionnaire indicates that the location was shown in the wrong city, so the question is not related to the accuracy of the location)

+6
source

Different devices have varying degrees of accuracy, and it is important that your application is aware of the difference. A cell phone with an integrated GPS device is usually accurate to three meters. A cell phone without a GPS device, with the GPS unit turned off, in order to maximize the battery, or in a place where the GPS contact cannot touch the GPS satellites, you will have to use a triangulation of a cellular camera to estimate the location of users and, as a rule, accuracy within 3000 meters, which is accurate enough to know what area the user is in, but it’s completely useless to tell them which building they are looking at.

If a user accesses your site from a computer connected to a terrestrial broadband connection, they can usually pinpoint the exact address by consulting the supplier’s database and pinpointing the address from the DSL or cable provider.

To get the accuracy of the location information, you can request the accuracy property on the coords object. The accuracy property is not accurate, but it will give your application a good idea of ​​whether you have an almost exact position or surroundings.

+3
source

According to Firefox Location FAQs, Firefox uses Google for location services. It sends Google the following information:

  • Your IP address
  • Information about the nearest Wi-Fi access points.
  • Google randomly assigned id (changed weekly)

I assume that it will also use GPS data if a receiver is installed on your computer, but this is not mentioned in the FAQ. Perhaps because there is no need to use Google sever if you have GPS data.

I assume that Chrome, as a Google product, uses the same geolocation database.

As for why you get the wrong answers, they will be in the Google database. There are certainly errors. For example, my office computer appears in the city of Mexico City, although my IP address and the IP address of my employer proxy server are in Plano, Texas, and all other IP-to-location databases have this correct value (taken from a registered whois data for address.)

Here are two Google pages that they claim will help, although they haven't done anything for me yet:

The latter (contact / ip) is a form for reporting Google location problems that result in Google redirecting you to the wrong country homepage. They say that it may take more than a month to fix the database. I waited almost two months with no luck.

There are Firefox add-ons that you can use to get your browser to report a specific location. They are designed to debug location-based web services, but they can also be used in cases where the normal method does not work.

+1
source

Depending on which method is used to get your location. If it uses IP, you can find anything. If it uses Wifi, then it may just be biased data.

-2
source

All Articles