Martin Atkins (mart) wrote in apparentlymart,
Martin Atkins
mart
apparentlymart

Perl interface to Google Static Maps API

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?.

Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments