add:  if (this.Map.maptype < 1){ switch (this.Map.maptype){ case 0: this.Map.map.setMapType(G_NORMAL_MAP); break; case -1: this.Map.map.setMapType(G_SATELLITE_MAP); break; case -2: this.Map.map.setMapType(G_HYBRID_MAP); break; } }else{  var count = this.Map.maptypes.length; for (n=0; n<count; n++){ if (this.Map.maptypes[n].maptype_id == this.Map.maptype){ this.Map.map.setMapType(this.Map.maptypes[n].type); } } } 
context: 		 "updateMap": function(rslt){			var xml = rslt.responseXML;				//shorten var names			var id = xml.documentElement.getElementsByTagName('gmap_id');			this.Map.id = id[0].firstChild.nodeValue;			var t = xml.documentElement.getElementsByTagName('title');			this.Map.title = t[0].firstChild.nodeValue;			var d = xml.documentElement.getElementsByTagName('description');			this.Map.description = d[0].firstChild.nodeValue;							var dt = xml.documentElement.getElementsByTagName('data');			if ( dt[0].hasChildNodes() ){				this.Map.data = dt[0].firstChild.nodeValue;				var pdt = xml.documentElement.getElementsByTagName('parsed_data');				this.Map.parsed_data = pdt[0].firstChild.nodeValue;			}else{				this.Map.data = "";				this.Map.parsed_data = "";			}			var w = xml.documentElement.getElementsByTagName('width');			this.Map.width = w[0].firstChild.nodeValue;			var h = xml.documentElement.getElementsByTagName('height');			this.Map.height = h[0].firstChild.nodeValue;						var lt = xml.documentElement.getElementsByTagName('lat');			this.Map.center.lat = parseFloat(lt[0].firstChild.nodeValue);			var ln = xml.documentElement.getElementsByTagName('lng');			this.Map.center.lng = parseFloat(ln[0].firstChild.nodeValue);			var z = xml.documentElement.getElementsByTagName('zoom');			this.Map.zoom = parseInt(z[0].firstChild.nodeValue);	//			var mt = xml.documentElement.getElementsByTagName('maptype');	//			this.Map.maptype = this.Map.maptypes[mt[0].firstChild.nodeValue];						var sc = xml.documentElement.getElementsByTagName('zoom_control');			this.Map.controls.zoom_control = sc[0].firstChild.nodeValue;			var sm = xml.documentElement.getElementsByTagName('maptype_control');			this.Map.controls.maptype_control = sm[0].firstChild.nodeValue;			var oc = xml.documentElement.getElementsByTagName('overview_control');			this.Map.controls.overview_control = oc[0].firstChild.nodeValue;			var ss = xml.documentElement.getElementsByTagName('scale');			this.Map.controls.scale = ss[0].firstChild.nodeValue;				//replace everything				var maptile = $('mymaptitle');			if (maptile){maptile.innerHTML=this.Map.title;}						var mapdesc = $('mymapdesc');			if (mapdesc){mapdesc.innerHTML=this.Map.description;}						$('mapcontent').innerHTML = this.Map.parsed_data;			var mapdiv = $(this.Map.mapdiv);			if (this.Map.width != '0' && this.Map.width != 0){			   var newWidth = this.Map.width + "px";			}else{			   var newWidth = 'auto';			}			if (this.Map.height != '0' && this.Map.height != 0){			   var newHeight = this.Map.height + "px";			}else{			   var newHeight = 'auto';			}			if (mapdiv){				mapdiv.style.width = newWidth; 				mapdiv.style.height = newHeight; 				this.Map.map.checkResize();			}					//			this.Map.map.setMaptype(this.Map.maptype);				//Add Map TYPE controls - buttons in the upper right corner	  		if (this.Map.controls.maptype_control == 'true'){	  		    this.Map.map.removeControl( this.Map.typeControl );				this.Map.typeControl = new GMapTypeControl();				this.Map.map.addControl( this.Map.typeControl );  	  		}else{	  		    this.Map.map.removeControl( this.Map.typeControl );	  		}	  			  		//Add Scale controls	  		if (this.Map.controls.scale == 'true'){	  		    this.Map.map.removeControl( this.Map.scaleControl );				this.Map.scaleControl = new GScaleControl();	  		    this.Map.map.addControl( this.Map.scaleControl );	  		}else{	  		    this.Map.map.removeControl( this.Map.scaleControl );	  		}	  					//Add Navigation controls	  		this.Map.map.removeControl( this.Map.navControls );			switch (this.Map.controls.zoom_control){				case 's': 					this.Map.navControls = new GSmallMapControl();					break;				case 'l': 					this.Map.navControls = new GLargeMapControl();					break;				case 'z': 					this.Map.navControls = new GSmallZoomControl();					break;				default:					this.Map.navControls = null;					break;			}			if ( this.Map.navControls != null ){				this.Map.map.addControl( this.Map.navControls );			}	  					this.Map.map.setCenter(new GLatLng(this.Map.center.lat, this.Map.center.lng), this.Map.zoom);							this.editMap();		 },
meta: 1713	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1713/705a28a3b2b3e74c5c8275d49bc31e869ff4bfcd/Edit.js/clean/templates/Edit.js