Skip to content

Instantly share code, notes, and snippets.

@garethredfern
Created October 28, 2013 06:02
Show Gist options
  • Save garethredfern/7192030 to your computer and use it in GitHub Desktop.
Save garethredfern/7192030 to your computer and use it in GitHub Desktop.
{{ if where }}
<div class="map" id="contact-map"></div>
<style scoped>
.map {height: 300px; width: 100%; max-width: 500px;}
</style>
<script type="text/javascript">
try{_location_maps.length;}catch(e){var _location_maps={};}
_location_maps["contact-map"] = {markers: [{'latitude': '{{ where:latitude }}','longitude':'{{ where:longitude }}','marker_content':'<h2>{{ where:name }}<\/h2>'}],clusters: true,spiderfy_on_max_zoom: true,show_coverage_on_hover: true,zoom_to_bounds_on_click: true,single_marker_mode: false,animate_adding_markers: true,disable_clustering_at_zoom: 15,max_cluster_radius: 80,starting_latitude: {{ where:latitude }},starting_longitude: {{ where:longitude }},starting_zoom: 15};
</script>
{{ location:start_maps }}
{{ endif }}
include:
- basic
fields:
where:
display: Local
type: location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment