From GamingWiki
Jump to: navigation, search
Line 34: Line 34:
 
getMarkerList();
 
getMarkerList();
 
//addOverlays();
 
//addOverlays();
 +
addRailways();
 
jumpto = unescape(self.document.location.hash.substring(1));
 
jumpto = unescape(self.document.location.hash.substring(1));
 
recentre(jumpto);
 
recentre(jumpto);
Line 92: Line 93:
 
// Also add a marker
 
// Also add a marker
 
addMarkerByLatLng(lat,lng,title,id);
 
addMarkerByLatLng(lat,lng,title,id);
 +
}
 +
 +
/**
 +
* Add a polyline to the map
 +
*/
 +
function addPath(corners, title, id) {
 +
var path = new google.maps.Polyline({
 +
path:          corners,
 +
strokeColor:  "#00FF00",
 +
strokeOpacity: 0.8,
 +
strokeWeight:  2,   
 +
map:          map
 +
});
 +
// Don't create a marker
 
}
 
}
  
Line 168: Line 183:
 
});
 
});
 
GagePark.setMap(map);
 
GagePark.setMap(map);
 +
}
 +
 +
function addRailways() {
 +
var coords = new google.maps.MVCArray();
 +
coords.push(new google.maps.LatLng(43.2524,-79.8047));
 +
coords.push(new google.maps.LatLng(43.2676,-79.8691));
 +
addPath(coords,'','');
 
}
 
}
  
 
// --></script>
 
// --></script>
 
</html>
 
</html>

Revision as of 16:16, 10 August 2011