// Check to see if this browser can run the Google API
if (GBrowserIsCompatible()) {
var linkStart = "';
navHTML += linkStart+'pan(map, north)">
';
navHTML += '
';
navHTML += "
";
navHTML += linkStart+'pan(map, west)">
';
navHTML += linkStart+'origin(map)">
';
navHTML += linkStart+'pan(map, east)">
';
navHTML += "
";
navHTML += '
';
navHTML += linkStart+'pan(map, south)">
';
navHTML += '
';
navHTML += "
";
navHTML += "";
set_div_text("nav", navHTML);
// zoomControl image stuff
var zoomHTML = "
";
imagePath = 'http://www.bondst.org/'+'images/'+images_folder+'/ctlZoomIn.'+images_extension;
zoomHTML += linkStart+"zoomCtl(map, map.getZoomLevel() - 1)\">
";
imagePath = 'http://www.bondst.org/'+'images/'+images_folder+'/ctlZoomNotch.'+images_extension;
for(var i=0; i < 18; i++){
zoomHTML += linkStart+"zoomCtl(map, "+i+")\">
";
}
var imagePath = 'http://www.bondst.org/'+'images/'+images_folder+'/ctlZoomOut.'+images_extension;
zoomHTML += linkStart+"zoomCtl(map, map.getZoomLevel() + 1)\">
";
zoomHTML += "";
set_div_text("zoom", zoomHTML);
//**************
// make the map and markers
//**************
if(!map){
var map = new GMap(document.getElementById("map"));
}
var startCenter = new GPoint(0, 25);
map.centerAndZoom(startCenter, 15);
document.images['z15'].src = 'http://www.bondst.org/'+'images/'+images_folder+'/ctlZoomSel.'+images_extension;
// Create our marker icon
var icon = new GIcon();
icon.image = 'http://www.bondst.org/'+'images/site.png';
icon.shadow = 'http://www.bondst.org/'+'images/siteShadow.png';
icon.iconSize = new GSize(48, 44);
icon.shadowSize = new GSize(2, 2);
icon.iconAnchor = new GPoint(47, 43);
icon.infoWindowAnchor = new GPoint(47,43);
var iconSel = new GIcon();
iconSel.image = 'http://www.bondst.org/'+'images/siteSelected.png';
iconSel.shadow = 'http://www.bondst.org/'+'images/siteShadow.png';
iconSel.iconSize = new GSize(48, 44);
iconSel.shadowSize = new GSize(2, 2);
iconSel.iconAnchor = new GPoint(47, 43);
iconSel.infoWindowAnchor = new GPoint(47, 43);
var iconSelLine = new GIcon();
iconSelLine.image = 'http://www.bondst.org/'+'images/siteSelectedLine.png';
iconSelLine.shadow = 'http://www.bondst.org/'+'images/siteShadow.png';
iconSelLine.iconSize = new GSize(9, 898);
iconSelLine.shadowSize = new GSize(2, 2);
iconSelLine.iconAnchor = new GPoint(3, 898);
iconSelLine.infoWindowAnchor = new GPoint(3, 898);
for(i=0; i < document.sites.length; i++){
createMarker(map, document.sites[i]);
}
// display a warning if the browser was not compatible
} else {
alert("Sorry, the Google Maps API is not compatible with this browser");
}
GEvent.addListener(map, "click", function(marker, point) {
if(document.getElementById("map_message")){ //this tells us if we are in the Lat/Lng finder
var latLngStr = '(' + point.y + ', ' + point.x + ')';
document.getElementById("map_message").innerHTML = latLngStr;
//mark clicked location
if(document.latlngMarker){
map.removeOverlay(document.latlngMarker);
}
var newMarker = new GMarker(point, iconSel);
document.latlngMarker = newMarker;
map.addOverlay(document.latlngMarker);
}
});
//
// load site excerpts from div elements
//
for(var i = 0; i < document.sites.length; i++){
var sd = document.getElementById('site'+document.sites[i].id);
if(sd != null && sd != "undefined"){
document.sites[i].desc = sd.innerHTML;
}
}