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: //forums.digitalpoint.com/usermap.php
4 thoughts on “Google Maps API Is Pimp”
Pretty cool little tool.
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!
Dosent the Google Maps API Require the
Latitude and Longitude ?
How do you determine Latitude and Longitude from the visitors IP Address ?
You first need the ability to geotarget the user (locate them based on their IP address).