rem: GeoMashup.locations[point].marker = marker; 
context: GeoMashup.loadMap = function() {	this.container = document.getElementById("geoMashup");	this.checkDependencies();	this.map = new GMap(this.container);	GEvent.addListener(this.map, "moveend", function() {		// Download markers from the blog and load it on the map. The format we		// expect is:		// <markers>		//	<marker post_id="1" lat="37.441" lon="-122.141"/>		//	<marker post_id="2" lat="37.322" lon="-121.213"/>		// </markers>		var request = GXmlHttp.create();		var bounds = GeoMashup.map.getBoundsLatLng();		var url = GeoMashup.linkDir + '/geo-rss.php?minlat=' +			bounds.minY + '&minlon=' + bounds.minX + '&maxlat=' +			bounds.maxY + '&maxlon=' + bounds.maxX;		request.open("GET", url, true);		request.onreadystatechange = function() {			if (request.readyState == 4) {				var xmlDoc = request.responseXML;				var markers = xmlDoc.getElementsByTagName("marker");				for (var i = 0; i < markers.length; i++) {					// Make a marker for each new post location					var post_id = markers[i].getAttribute("post_id");					if (!GeoMashup.posts[post_id]) {						// This post has not yet been loaded						var point = new GPoint(							parseFloat(markers[i].getAttribute("lon")),							parseFloat(markers[i].getAttribute("lat")));						if (!GeoMashup.locations[point]) {							// There are no other posts yet at this point, create a marker							GeoMashup.locations[point] = new Object();							GeoMashup.locations[point].posts = new Array();							GeoMashup.locations[point].posts.push(post_id);							GeoMashup.locations[point].loaded = new Array();							GeoMashup.posts[post_id] = true;							var marker = GeoMashup.createMarker(point);							GeoMashup.map.addOverlay(marker);							GeoMashup.locations[point].marker = marker;						} else {							// There is already a marker at this point, add the new post to it							GeoMashup.locations[point].posts.push(post_id);							GeoMashup.posts[post_id] = true;						}					}				} // end for each marker				if (GeoMashup.firstLoad) {					GeoMashup.firstLoad = false;					GeoMashup.clickCenterMarker();				}			} // end readystate == 4		} // end onreadystatechange function		request.send(null);	});		// Experimental - add WMS map types	// var tsdrg = new WMSSpec(this.map.mapTypes[0], "http://www.terraserver-usa.com/ogcmap6.ashx?", "Topo", "DRG", "", "image/jpeg");	// this.map.mapTypes.push(tsdrg);	if (!this.loadLat && !this.loadLon) {		// look for load settings in cookies		this.loadLat = this.getCookie("loadLat");		this.loadLon = this.getCookie("loadLon");		this.loadZoom = parseInt(this.getCookie("loadZoom"));		var mapTypeNum = parseInt(this.getCookie("loadType"));		this.loadType = this.map.getMapTypes()[mapTypeNum];	}	// Use default zoom level if appropriate	if (!this.loadZoom && this.defaultZoom) {		this.loadZoom = this.defaultZoom;	} else {		this.loadZoom = 5;	}	// Use default map type if appropriate	if (!this.loadType && this.defaultMapType) {		this.loadType = this.defaultMapType;	} 	if (this.loadLat && this.loadLon && this.loadZoom) {		// Center on the last clicked marker		this.map.centerAndZoom(new GPoint(this.loadLon, this.loadLat), this.loadZoom);	} else {		// Center the map on the most recent geo-tagged post		var request = GXmlHttp.create();		var url = this.linkDir + '/geo-rss.php';		request.open("GET", url, false);		request.send(null);		var xmlDoc = request.responseXML;		var markers = xmlDoc.getElementsByTagName("marker");		if (markers.length>0) {			var point = new GPoint(				parseFloat(markers[0].getAttribute("lon")),				parseFloat(markers[0].getAttribute("lat")));			this.map.centerAndZoom(point,this.loadZoom);		}	}	// Add controls	if (this.mapControl == 'GSmallZoomControl') {		this.map.addControl(new GSmallZoomControl());	} else if (this.mapControl == 'GSmallMapControl') {		this.map.addControl(new GSmallMapControl());	} else if (this.mapControl == 'GLargeMapControl') {		this.map.addControl(new GLargeMapControl());	}		if (this.addMapTypeControl) {		this.map.addControl(new GMapTypeControl());	}	if (this.loadType) {		this.map.setMapType(this.loadType);	}} // end loadMap();
meta: 6742	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6742/4a2cb1c3b2109942869e24b33348cc32f3ec689f/geo-mashup.js/clean/geo-mashup/geo-mashup.js