Mapstraction, Maps and Me

It’s been a while since my last blog post; my day job at Nokia has been taking up almost all of my time and what little time has been left has been spent with my family. But in between day job and family time there’s evenings spent in a hotel room and hours spent on a plane, mainly between London’s Heathrow and Berlin’s Tegel airports. It’s in these periods of time that a combination of my MacBook Pro, running a combo of Apache/MySQL/PHP with MAMP and TextMate has allowed me to rediscover the pleasure of what I used to do for my day job before Yahoo! and before Nokia … and that’s to write code.

As a fully unreconstructed maps nerd, I love the variety and richness of the mapping APIs available on today’s internet. One of the best books on how to use these mapping APIs is the “does just what it says on the label” Map Scripting 101 by Adam DuVander. While the book touches on the power of the APIs from Google, from Yahoo, and from Bing (amongst others) its main focus in on Mapstraction, the JavaScript mapping abstraction library.

Brain Map

As the name suggest, Mapstraction abstracts, or wraps, the differences between the variety of approaches that each JavaScript mapping API uses into a single consistent interface. With Mapstraction, the API methods to create a map, to change the zoom level, to centre the map, to add a marker or push pin to the map are the same, regardless of which underlying mapping API you use.

Mapstraction allowed you to use the mapping APIs from Google, Yahoo, Bing, Cloudmade, GeoCommons, Cartocuidad, Yandex and MapQuest. But not Nokia’s Ovi Maps API, which was released in February 2011. This is where my local Apache installation, TextMate and the aforementioned hotel room and flight time comes back into the story. Cue a frantic crash course to reacquaint myself with JavaScript, some trial and error, some swearing and some background reading to convert my slightly outdated knowledge of CVS into how to use git and Mapstraction now supports the Ovi Maps API. No, really. It’s on github right now.

There’s a demo of some of the major features of both Mapstraction and the Ovi Maps API over at maps.vicchi.org and, in the spirit of social coding, the source for that is on github as well.

I’m not suggesting for one moment that if the current geo day job falls through I can happily pick up a replacement role coding JavaScript, or coding anything for that matter, but it’s oddly reassuring that I still have the vague ability to continue the profession of coding software that earnt me a living for almost 25 years.

Photo Credits: Infidelic on Flickr.
Written and posted from home (51.427051, -0.333344)

Comments are closed.