13
Dec
08

Google Maps geo-location by IP Flex example

Following on from my earlier post regarding Google Maps and Flex, I’ve put together a new example which I reckon’s pretty nifty.

Somehow my idea was spawned by Andrew Shorten’s post which discussed using Google Maps and the new Adobe Cocomo service to create a collaborative mapping application. And I say somehow, as I’m not really sure how I went off on the tangent of geo-locating IP addresses when the original post was about two users drawing stuff on a shared map! Maybe they can see where each other is on the map and start drawing a line until they meet somewhere in the middle…

Anyway, (il)logic aside here’s the example I whipped up:

View source is enabled in the following example.

The “Geo-locate IP address” text field should auto populate with your current IP address. The initial map will load and center on London.

When coding up the infowindow that displays, I found this reference on the Google site very useful - http://code.google.com/apis/maps/documentation/flash/reference.html

The actual information is coming from a whopping great big file that I’ve uploaded to my server which was supplied by Maxmind. There’s a few other databases that they supply, so I might add some more features to this example down the track. And they have pay for use and free versions of all their data, which is great!

Share and Enjoy:
  • del.icio.us
  • Digg
  • Fark
  • Google
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Yahoo! Buzz

9 Responses to “Google Maps geo-location by IP Flex example”


  1. 1 Abdul Qabiz Dec 13th, 2008 at 4:08 pm

    pretty cool, thanks for sharing the code.

    -abdul

  2. 2 Peter Jan 4th, 2009 at 12:59 am

    Awesome stuff. Do you have the xml code for viewing?

  3. 3 Jason Langdon Jan 5th, 2009 at 2:45 pm

    @Peter - which xml code are you after? If you’re looking for the MXML code, then just right click on the Flash and “View Source”

  4. 4 Peter Jan 8th, 2009 at 7:48 am

    I figured it out - DUH! :) but thanks for your help.

  5. 5 Adobe Flex Tutorial Feb 1st, 2009 at 8:08 pm

    Hey,
    Here is a tutorial to show how to install and use the MaxMind Database with PHP scripts examples. And it also shows how to display it on a map (Yahoo! Map) (french):
    http://www.flex-tutorial.fr/2009/02/01/flex-yahoo-maps-api-geo-localisation-par-ip-dun-visiteur-exemple/

  6. 6 jfdonohoe May 27th, 2009 at 6:42 pm

    This is great. The map showed my actual location within yards!

    Question for you about accuracy. Do you know of any resources that shows the reliability of current geolocation IP detection experiences.

    I would like to be able to assure my clients that accurately identifying an end-users geolocation by IP address to the metro, or even state, level is above 90% accurate.

    It would be great if there was some sort of public accessible statistics I could direct them to.

    I know the service/database used has a lot to do with the final accuracy results but a 99.9% accurate database still is only one piece of the puzzle for a consistently reliable end-user experience.

    Thanks!

    -john

  7. 7 Jason Langdon May 28th, 2009 at 9:30 am

    Hi John, you’d have to take this up with Maxmind (http://www.maxmind.com/app/city#api) who created the database.

  1. 1 google maps | Digg hot tags Pingback on Dec 13th, 2008 at 5:07 pm
  2. 2 » Google Maps geo-location by IP Flex example at calm in the chaos da 24 Blog News Pingback on Dec 13th, 2008 at 8:42 pm

Leave a Reply




Categories

Recent Comments

Posts this month

December 2008
M T W T F S S
« Nov   Jan »
1234567
891011121314
15161718192021
22232425262728
293031  

Archives