0
votes

I'd like to be able to use the stamen maps watercolor layer in conjunction with the static maps api from Google.

I'm hoping this is simple but I'm not sure how to implement it...

A static maps URL looks something like this:

https://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=12&size=400x400&sensor=false

And the Stamen maps information is here:

http://maps.stamen.com/#watercolor

Thanks a lot for your help!

1

1 Answers

1
votes

If you go to this page you'll see that you can center on an area, select the map style and the image size, and then press the "MAKE" button. This will generate a static image which you can then reference.

Stamen doesn't offer a static maps URL you can use to generate maps from a lat/lng pair, like Google does. If this is for a one-off map, you'll be fine. Otherwise, it doesn't seem like you'd be able to easily (see below) dynamically generate static map images.

P.S. If you're really really interested, you could take a look at the page's JavaScript source and see that by calling generateExportURL(), you'd get the URL to start a server-side rendering of a static watercolor map. You'd then need to poll that same URL (using (for instance) a server-side proxy, as cross-domain restrictions won't allow you to poll this page from your JavaScript source) to check when the map's "status" changes from "not_started" to "finished"... :-)