/* mapping javascript routines for dance.net */

// From http://code.google.com/apis/maps/documentation/mapplets/overlays.html
// Create a base icon for all of our markers that specifies the
// shadow, icon dimensions, etc.
var baseIcon = new GIcon();
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
baseIcon.infoShadowAnchor = new GPoint(18, 25);

function gmap_make_marker(latlng, text, letter) {
	if (letter) {
		var icon = new GIcon(baseIcon);
		if (letter=='?') {
			icon.image = "http://www.xp.com/images/marker/qmarker.png";
		} else {
			icon.image = "http://www.google.com/mapfiles/marker"+letter+".png";
			icon.printImage = "http://maps.google.com/mapfiles/marker"+letter+"ie.gif";
			icon.mozPrintImage = "http://maps.google.com/mapfiles/marker"+letter+"ff.gif";
		}
	
		var marker = new GMarker(latlng, {icon: icon});
	} else
		var marker = new GMarker(latlng);
	GEvent.addListener(marker, 'click', function() {
		marker.openInfoWindowHtml(text);
	});
	return marker;
}
