IP address to GPS coordinates

5,413 views
Skip to first unread message

Benjamin

unread,
Mar 25, 2010, 11:22:05 AM3/25/10
to Google App Engine
Does anyone know a good way to get an approximate GPS coordinate
(Latitude and Longitude) when you have a users IP Address?

When my users post to a web service i'm pretty sure i know their IP.
I'd like to get the Latitude and Longitude of the client based on that
like GEO IP does but from my system running on app engine.

Jeff Schnitzer

unread,
Mar 25, 2010, 12:51:54 PM3/25/10
to google-a...@googlegroups.com
http://www.google.com/search?q=geocode+ip+address

Jeff

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
>

Ulrich

unread,
Mar 25, 2010, 1:00:56 PM3/25/10
to google-a...@googlegroups.com
Something like http://www.maxmind.com/app/ip-location could help you. I
would download the database and load it into the datastore.

-Ulrich

N. Rosencrantz

unread,
Mar 25, 2010, 4:58:34 PM3/25/10
to Google App Engine
latlng = new google.maps.LatLng(google.loader.ClientLocation.latitude,
google.loader.ClientLocation.longitude);

There's code available (montao.googlecode) doing something simililar
and live usecase koolbusiness.com

nickmilon

unread,
Mar 25, 2010, 5:53:53 PM3/25/10
to Google App Engine
The best approach is to delegate the task to the client using
javascript and a geolocation service provided my google maps API as
Niklasrol above suggests, it is free for non-commercial use and the
most acurate method.
For an example you can take a look at my app http://www.geognos.com/geo/en/cc/us.html
and select move map > my place from the drop box on top right for an
explanation take a look at page source and javascript.

If you have to do it in the server you can use an API like maxminds as
Ulrich above is suggesting or you can build your own service on app
engine.
For an example of the later see http://milon.appspot.com/stravon/db/cc/83.212.217.149
and may be you read my remarks on this here in the following thread
http://groups.google.com/group/google-appengine/browse_thread/thread/2e31c17842eba834/ddc371f9f6ff6e91?q=#ddc371f9f6ff6e91

Happy coding ;)


On Mar 25, 7:00 pm, Ulrich <mierendo...@googlemail.com> wrote:
> Benjamin wrote:
> > Does anyone know a good way to get an approximate GPS coordinate
> > (Latitude and Longitude) when you have a users IP Address?
>
> > When my users post to a web service i'm pretty sure i know their IP.
> > I'd like to get the Latitude and Longitude of the client based on that
> > like GEO IP does but from my system running on app engine.
>

> Something likehttp://www.maxmind.com/app/ip-locationcould help you. I

Benjamin

unread,
Mar 29, 2010, 10:27:59 AM3/29/10
to Google App Engine
thanks guys - a web service to submit an IP and get Lat and Long back
would be ideal for me, since i need to get them during a POST coming
from devices; i won't be able to launch any client code. I'm sure
there will be a web service that does this eventually or i'll make it.


On Mar 25, 5:53 pm, nickmilon <nickmi...@gmail.com> wrote:
> The best approach is to delegate the task to the client using
> javascript and a geolocation service provided my google maps API as
> Niklasrol above suggests, it is free for non-commercial use and the
> most acurate method.
> For an example you can take a look at my app  http://www.geognos.com/geo/en/cc/us.html
> and select move map > my place from the drop box on top right for an
> explanation take a look at page source and javascript.
>
> If you have to do it in the server you can use an API like maxminds as
> Ulrich above is suggesting or you can build your own service on app
> engine.
> For an example of the later see  http://milon.appspot.com/stravon/db/cc/83.212.217.149

> and may be you read my remarks on this here in the following threadhttp://groups.google.com/group/google-appengine/browse_thread/thread/...


>
> Happy coding ;)
>
> On Mar 25, 7:00 pm, Ulrich <mierendo...@googlemail.com> wrote:
>
>
>
> > Benjamin wrote:
> > > Does anyone know a good way to get an approximate GPS coordinate
> > > (Latitude and Longitude) when you have a users IP Address?
>
> > > When my users post to a web service i'm pretty sure i know their IP.
> > > I'd like to get the Latitude and Longitude of the client based on that
> > > like GEO IP does but from my system running on app engine.
>

> > Something likehttp://www.maxmind.com/app/ip-locationcouldhelp you. I

Benjamin

unread,
Mar 29, 2010, 10:31:14 AM3/29/10
to Google App Engine
actually this may be exactly what i needed:

http://www.hostip.info/

On Mar 25, 5:53 pm, nickmilon <nickmi...@gmail.com> wrote:

> The best approach is to delegate the task to the client using
> javascript and a geolocation service provided my google maps API as
> Niklasrol above suggests, it is free for non-commercial use and the
> most acurate method.
> For an example you can take a look at my app  http://www.geognos.com/geo/en/cc/us.html
> and select move map > my place from the drop box on top right for an
> explanation take a look at page source and javascript.
>
> If you have to do it in the server you can use an API like maxminds as
> Ulrich above is suggesting or you can build your own service on app
> engine.
> For an example of the later see  http://milon.appspot.com/stravon/db/cc/83.212.217.149

> and may be you read my remarks on this here in the following threadhttp://groups.google.com/group/google-appengine/browse_thread/thread/...


>
> Happy coding ;)
>
> On Mar 25, 7:00 pm, Ulrich <mierendo...@googlemail.com> wrote:
>
>
>
> > Benjamin wrote:
> > > Does anyone know a good way to get an approximate GPS coordinate
> > > (Latitude and Longitude) when you have a users IP Address?
>
> > > When my users post to a web service i'm pretty sure i know their IP.
> > > I'd like to get the Latitude and Longitude of the client based on that
> > > like GEO IP does but from my system running on app engine.
>

> > Something likehttp://www.maxmind.com/app/ip-locationcouldhelp you. I

drew einhorn

unread,
Mar 29, 2010, 1:58:37 PM3/29/10
to google-a...@googlegroups.com
On Mon, Mar 29, 2010 at 8:31 AM, Benjamin <bsau...@gmail.com> wrote:
> actually this may be exactly what i needed:
>
> http://www.hostip.info/
>

How important is a correct answer on the first try?

I'm visiting a friend in Thousand Oaks, CA,
but this site says I'm in Reston, VA.

I suspect that it says most if not all Verizion customers,
live in Reston, VA.

These guys do a better job with my current ip,
they think I'm in Oxnard, CA with my friends tell me
is 15min or so by car, not a couple days by car.

Demos are free, but if you want to check more than
25/day you need to pay.

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
>

--
Drew Einhorn

Benjamin

unread,
Apr 1, 2010, 12:47:42 PM4/1/10
to Google App Engine
Hi Drew - just to confirm, i'm in Philadelphia and it gives me Reston,
VA since I'm using verizon fios - so maybe that resource isn't very
good for my purposes after all.

On Mar 29, 1:58 pm, drew einhorn <drew.einh...@gmail.com> wrote:

> >> > Something likehttp://www.maxmind.com/app/ip-locationcouldhelpyou. I

Reply all
Reply to author
Forward
0 new messages