Skip to content

Instantly share code, notes, and snippets.

@jeena
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeena/e9126b360c48e498cb23 to your computer and use it in GitHub Desktop.
Save jeena/e9126b360c48e498cb23 to your computer and use it in GitHub Desktop.
<% unless @exif.gps.blank? %>
<p class="map">
<% img_url = "http://staticmap.openstreetmap.de/staticmap.php?center=" + @exif.gps.latitude.to_s + "," + @exif.gps.longitude.to_s + "&zoom=7&size=640x480&markers=" + @exif.gps.latitude.to_s + "," + @exif.gps.longitude.to_s + ",red-pushpin" %>
<% map_url = "http://www.openstreetmap.org/?mlat=" + @exif.gps.latitude.to_s + "&mlon=" + @exif.gps.longitude.to_s + "&zoom=12";%>
<%= link_to(image_tag(mapimage_path(img_url)), map_url) %>
</p>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment