meo
meo

Reputation: 31249

precise geolocalization via IP

I tied the iPad the other day, and was amazed about the precision of the geo localization by ip. Actually there is this action against hunger in the world that shows you very precisely where the persons are located that have took part to this petition:

http://www.1billionhungry.org/meodai/impact/

I would like to integrate that in one of my projects. I took a look at the source but i could not figure out how they did it. Can someone help me out? is there a web service for that?

What i am not looking for is a service that gives back the location of my ISP, i need the position of the actual IP

for example I'm situated in Fribourg, Switzerland my ISP is in zürich Switzerland. Most of those services give back the location of my ISP, the iPad or the link i have posted are giving me back a precise localization by the IP. (actually even the address is right)

Is the google map api doing this or are they using an other service?

Upvotes: 3

Views: 2918

Answers (3)

fmark
fmark

Reputation: 58567

They are using another service which uses wireless access points for geolocation. The same features can be accessed in some browsers using HTML5's geolocation API:

function do_something(lat, long){
    alert(lat + ", " + long);
}

if (navigator.geolocation) {  
    /* geolocation is available */  
    navigator.geolocation.getCurrentPosition(function(position) {  
        do_something(position.coords.latitude, position.coords.longitude);  
    });  
} else {  
    alert("I'm sorry, but geolocation services are not supported by your browser.");  
}

The Google Gears plugin provides a similar API for those with non-supporting browsers who have the plugin installed.

Generally, the implementations of the geolocation API use wireless access points and cell towers for geolocation. If these are not available (i.e. the user is on a desktop without a wireless card, or there are no wireless access points nearby), they generally fallback to IP-based geolocation.

Upvotes: 3

Unknown
Unknown

Reputation: 5772

Read this for an article on ipad's geolocation... it's not completely IP related as you might think. That's why you won't find a geolocation library that will do what you want, because those just map ip addresses to fixed locations.

Upvotes: 1

Tom Gullen
Tom Gullen

Reputation: 61737

Here's a google search with lots of databases to download: http://www.google.co.uk/#hl=en&q=ip+to+geo+database&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=77130048d7e0701a

Edit: Here's one free to download http://software77.net/geo-ip/

Precision is going to vary product to product, if you want higher accuracy you are going to have to pay for it.

Upvotes: 1

Related Questions