Quick hint - Google Static Maps API

In a web application it’s fairly common to use a map to show your user a location, area, travel route etc.

More often than not, you’ll use the Google Maps JavaScript API to do this. Sometimes this API feels a little more heavy than is really required. For example, I’ve wanted to just show a single pushpin on a thumbnail sized map to give users an idea of where a report came from, no interactivity needed.

Today, while working on something along those lines (popping up a little map to confirm that a GPS location was entered correctly), I came across Google’s “static maps” API. Not sure how long this has been around, but it’s already in version two.

Using the static maps service, it took around ten minutes to get a little map popup. Not bad at all.

Static maps API example

This image right here is generated from the API!

comments powered by Disqus