Often you’ll need a map on your website but not a full-fledged Google Map with all it’s interactivity (and added weight to the page). Luckily the Google Static Maps API is perfect these use cases. It will generate an image of the map via URL parameters and even allow you to add markers, lines, shapes and styles to the map. We’re going to be looking at the styling feature.
First, generating a basic map is quite simple. The center can be an address that will be geocoded, or a latitude and longitude.
So if we grab the JSON for the Midnight Commander style on Snazzy Maps and paste it into the Fiddle along with our base unstyled map from above, we’ll get a styled map URL.
The conversion sometimes isn’t quite exact and you may need to make some manual adjustments, but hopefully it gets you pretty close. There’s a lot you can do with the static maps API so be sure to check out the full documentation.