views:

99

answers:

3

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?

A: 

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.

Tom Gullen
those just give you back the country. I need a more precise geolocalizazion. Just like on the site i have liked. If you zoom in you see that the localization i pretty accurate. They all give back the postion of my ISP this is not what i am looking for.
meo
+1  A: 

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.

Unknown
+1 thank you for this article now i know how it works, but i still need to know what webservice to use to do the same. (as 1billionhungry.org)
meo
+2  A: 

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.

fmark
thank you a lot for those specifications!
meo