Wednesday, November 2nd, 2005Wednesday, November 2nd, 2005

Google Maps API Is Pimp

It's not the first time I used the Google Maps API, but every time I do something with it, I'm reminded about how damn cool it is.

It ended up being relatively trivial to show where in the world all the people currently visiting the forum are at in the world. Added some color coded pins and made the pins clickable (you can also automatically fly to the location if you have Google Earth installed).

In truth, the hardest part really had nothing to do with the API itself... it was making a caching mechanism for geolocation data on the IP address (no point in querying the database for all IPs for every page view), so it just queries for IPs that are new since the last time someone looked at the page.

Check it out: http://forums.digitalpoint.com/usermap.php

4 Responses to “Google Maps API Is Pimp”

  1. Bazkaz Says:

    Pretty cool little tool.

  2. anton-io! Says:

    Shawn that is the coolest thing ever! I can see how many crazy DP’ers are up in my area (4:20AM now!).
    Tie it in with Adsense and then we can see where the clicks are coming from!
    Have fun!

  3. Jark Says:

    Dosent the Google Maps API Require the
    Latitude and Longitude ?
    How do you determine Latitude and Longitude from the visitors IP Address ?

  4. Shawn Says:

    You first need the ability to geotarget the user (locate them based on their IP address).

Leave a Reply