Created
June 16, 2013 23:18
-
-
Save objectivehtml/5793811 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <a href="#" class="reveal" data-reveal-id="map-modal" id="reveal-trigger" style="display:none">Reveal</a> | |
| <div id="map-modal" class="reveal-modal"></div> | |
| {exp:gmap:init id="map" style="width:400px;height:300px"} | |
| {exp:gmap:marker id="map" address="Yellow Stone National Park" data:url="/google-maps/reveal-ajax"} | |
| {exp:gmap:marker id="map" address="Everglades National Park" data:url="/google-maps/reveal-ajax"} | |
| <script type="text/javascript"> | |
| // This example assumes your map id is "map". | |
| // Loop through the global marker array | |
| $.each(map_markers, function(i, marker) { | |
| google.maps.event.addListener(marker, 'click', function() { | |
| var url = this.data.url; | |
| $.get(url, function(html) { | |
| $('#map-modal').html(html); | |
| $('#reveal-trigger').click(); | |
| }); | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment