From GamingWiki
Jump to: navigation, search
Line 36: Line 36:
 
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
 
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
 
getMarkerList();
 
getMarkerList();
 +
addOverlays();
 
jumpto = unescape(self.document.location.hash.substring(1));
 
jumpto = unescape(self.document.location.hash.substring(1));
 
recentre(jumpto);
 
recentre(jumpto);
Line 94: Line 95:
  
 
/**
 
/**
 +
 
  * Centre on a particular location on the map, if it exists
 
  * Centre on a particular location on the map, if it exists
 
  */
 
  */
Line 106: Line 108:
 
}
 
}
 
map.setCenter(newLatLng);
 
map.setCenter(newLatLng);
 +
}
 +
 +
/**
 +
* addOverlays: custom overlays such as zones, roads, and so on.
 +
*/
 +
function addOverlays() {
 +
// Gage Park
 +
var GageParkCorners = [
 +
new google.maps.LatLng(43.2449, -79.8298),
 +
new google.maps.LatLng(43.2437, -79.8252),
 +
new google.maps.LatLng(43.2433, -79.8242),
 +
new google.maps.LatLng(43.2421, -79.8248),
 +
new google.maps.LatLng(43.2422, -79.8258),
 +
new google.maps.LatLng(43.2373, -79.8280),
 +
new google.maps.LatLng(43.2394, -79.8320)
 +
];
 +
var GagePark = new google.maps.Polygon({
 +
paths:      GageParkCorners,
 +
strokeColor: "#FF0000",
 +
strokeOpacity: 0.8,
 +
strokeWeight: 2,   
 +
fillColor: "#FF0000",
 +
fillOpacity: 0.35
 +
});
 +
GagePark.setMap(map);
 
}
 
}
  
 
// --></script>
 
// --></script>
 
</html>
 
</html>

Revision as of 20:10, 16 May 2011