Skip to content

Instantly share code, notes, and snippets.

@katydecorah
Last active November 23, 2016 11:22
Show Gist options
  • Save katydecorah/6487522 to your computer and use it in GitHub Desktop.
Save katydecorah/6487522 to your computer and use it in GitHub Desktop.
Generate a static Google Maps image for Jekyll posts.
{% if page.locations %}
<img src="http://maps.googleapis.com/maps/api/staticmap?{% for location in page.locations %}{% if forloop.first %}center={{location}}&markers=color:blue%7C{{location}}{% else %}&markers=color:blue%7C{{location}}{% endif %}{% endfor %}&zoom={% if page.zoom %}{{page.zoom}}{% else %}13{% endif %}&size=300x200&scale=2&sensor=false&visual_refresh=true" alt="">
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment