This blog can't be viewed on LiveJournal. Instead see

Perl interface to Google Static Maps API

27th Aug 2008

A bunch of times now I've written code that embeds maps from Google's Static Maps API. While it's a pretty simple API, there's a bunch of of fiddly string formats you need to get right and a few little inconsistencies that make it hard to remember what to do without studying the docs.

After re-implementing a map URL generator for the nth time I decided to make a library out of it. The result is Geo::Google::StaticMaps, which basically just transforms a map definition given as a bunch of nested hashes and arrays into a Static Maps API URL. It ought to support everything that the Static Maps API itself currently supports. If anything's missing/broken, please let me know. I'm now using it to produce the map on Where's Martin?.