-
-
Save BriceShatzer/c76cfbced852c14fd719 to your computer and use it in GitHub Desktop.
WPD_explanation
This file contains 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
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<h1>List of parks</h1> | |
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> | |
<div id="map" class="col-md-12" style="min-height:400px;"> | |
</div> | |
<script> | |
window.onload = function() { | |
function initialize() { | |
var Wheeling_LatLng = new google.maps.LatLng(42.131389, -87.929722); | |
var mapOptions = { | |
zoom: 12, | |
center: Wheeling_LatLng | |
}; | |
var map = new google.maps.Map(document.getElementById('map'), mapOptions); | |
{module_webapps,15712,a,,,,true,10,,1} | |
} | |
initialize(); | |
}; | |
</script> | |
</body> | |
</html> |
This file contains 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
var obj_{tag_counter} ={ | |
name:'{tag_name_nolink}', | |
num:'{tag_counter}', | |
type:'{tag_type}', | |
desc:'{tag_description}', | |
BC_latlng: new google.maps.LatLng({tag_addresslatitude},{tag_addresslongitude}), | |
custom_lat:'{tag_custom_lat}', | |
custom_lng:'{tag_custom_lng}', | |
custom_latlng: new google.maps.LatLng({tag_custom_lat}01,{tag_custom_lng}01), | |
pin_latlng: function() { | |
if ( !this.custom_lat || !this.custom_lng) | |
{return this.BC_latlng } | |
else {return this.custom_latlng } | |
} | |
}; | |
var info_{tag_counter} = new google.maps.InfoWindow({ | |
content: obj_{tag_counter}.desc | |
}); | |
var pin_{tag_counter} = new google.maps.Marker({ | |
position: obj_{tag_counter}.pin_latlng(), | |
map: map, | |
title: obj_{tag_counter}.name | |
}); | |
google.maps.event.addListener(pin_{tag_counter}, 'click', function() { | |
info_{tag_counter}.open(map,pin_{tag_counter}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment