gadss
gadss

Reputation: 22509

Geolocation returned location incorrect by 3 km

I was wondering when I used the javascript geolocation it didn't pin point into my exact location.. this is thec ode I used that I got in w3schools..(http://www.w3schools.com/html/html5_geolocation.asp)

 <script>
var x = document.getElementById("demo");
function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(showPosition);
    } else {
        x.innerHTML = "Geolocation is not supported by this browser.";
    }
}
function showPosition(position) {
    x.innerHTML = "Latitude: " + position.coords.latitude +
    "<br>Longitude: " + position.coords.longitude;
}
</script>

also with http://whereamirightnow.com/ it didn't point me exact location..

does anyone have an idea about my case?

Upvotes: 1

Views: 954

Answers (2)

Toni Tegar Sahidi
Toni Tegar Sahidi

Reputation: 943

as the developer of where am i right now, we're already said that our website use "any means necessary" to get your position.

IF you access our website from an GPS enabled smartphone / tablet, then You'll get the best position since the HTML5 geolocation will then get the location data from there.

If there aren't any GPS then, HTML5/W3C geolocation API (not my website, it's a feature built in by HTML5 Geolocation API) will try to determine the proximate location of your position, thus can be Wifi Location, CellPhone triangulation (if using wireless usb modem stick), or may even be IP froum your router/provider.

That's why Geolocation information will always have "accuracy" component, in which - in our website where am i right now, if it is less than 1000 metres (1Km), then we mark it with red color (poor accuracy).

the Geolocation is simply helpfull tool to get location for web based interface. the location data accuracy, however is independent from the API.

If you have any further question, please let me know, contact me from contact us section in bottom of the website.

Hope that's help :)

regards

Upvotes: 0

PeterJ
PeterJ

Reputation: 3789

Because you're using an ISP connection and desktop computer the gelocation will be based on your IP address rather than say a GPS receiver or cell tower location that may be used on a mobile device. Some browsers will use different IP geolocation services but for example from the Firefox Location Aware Browsing page:

If you consent, Firefox gathers information about nearby wireless access points and your computer’s IP address. Then Firefox sends this information to the default geolocation service provider, Google Location Services, to get an estimate of your location. That location estimate is then shared with the requesting website.

Accuracy varies greatly from location to location. In some places, our service providers may be able to provide a location to within a few meters. However, in other areas it might be much more than that. All locations returned by our service providers are estimates only and we do not guarantee the accuracy of the locations provided. Please do not use this information for emergencies. Always use common sense.

So it will depend on how granular the location information is provided by your ISP. In my case gelocation reports my position as the local telephone exchange where the ADSL DSLAM is located, which is approximately five kilometers away.

Upvotes: 2

Related Questions