Getting Your Geospatial Freak-on with MaxMind

Hey you! Yeah you... the dude that likes to hang out in the GPS section at Best Buy. I'm talking to you...

Back in 2000 / 2001 I worked for a company by the name of GeoDiscovery... and they had this crazy idea. They thought that you could take a GPS receiver and hook it up to a handheld device (Handspring Visor) and use it for navigation, recreation, and whatnot. Unfortunately, the dot com bust took it's toll... VC dried up and so did GeoDiscovery.

I have to laugh though... at one point I heard that the VC backing us didn't think that it was important to know exactly where the best sushi was in San Francisco. Hindsight is foresight that happens to late... no?

Fast forward to the year 5009... oops... too far... ot dniwer... 2009. Today, no one questions the value in knowing where you are, where you are going, where others are, and where they are going. People are running with a GPS on their wrist, have a GPS in their cars, one in their phone... and one attached to their pancreas.

Stage Right: enters MaxMind.

While working on a submission for a data visualization contest... I thought that it would be cool to include a geocode-by-ip feature... which lead me to MaxMind. If you'll notice they have... wait a minute! They don't have an ActionScript option for their GeoIP API!

Until now baby... I took one look at the JavaScript implementation and checked to see if they had a crossdomain in place. Sweetness.

Before you get too excited... remote execution of JavaScript is a problem so - we need to think a little outside the box. For starters... the JavaScript is generated and it's clean. It's part of an API so it should be safe to use a URLLoader and some string replacement therapy. BINGO! MaxMind is now ActionScript friendly.

I've wrapped this up in a class for you to use. It's really straight forward... and it gets you first class access to a really great service. If you use it in your app - make sure to give MaxMind some creds with a link to their site at They ask for this since they provide the service free of charge.

[ source: ]