rem: ref.bTP = new GPolyline(ref.bTempPoints,"#0000FF", 2, 1, opts) this.addOverlay( ref.bTP ); 
add: ref.TempOverlay = new GPolyline(ref.bTempPoints,"#0000FF", 2, 1, opts) this.addOverlay( ref.TempOverlay ); 
context: 	"addAssistant": function(a, b){		this.removeAssistant();		//marker assistant				if (a == 'marker'){			var f = $('edit-marker-form');			alert ('Marker ploting assistant activated for '+ f.title.value + ' marker. \n Click to Position!');						ref = this;						this.bAssistant = GEvent.addListener(this.Map.map, "click", function(overlay, point){				if (point) {					if (ref.TempOverlay != null) {						ref.removeOverlay(ref.TempOverlay);					}					ref.TempOverlay = new GMarker(point);					this.addOverlay(ref.TempOverlay);					this.panTo(point);					f['geo[lng]'].value = point.lng();					f['geo[lat]'].value = point.lat();				}			});		}				//map assistant		if (a == 'map'){			f = $('edit-map-form');			alert ('Map centering assistant activated. \n Click to get center lat and lng values!');						this.bAssistant = GEvent.addListener(this.Map.map, "click", function(overlay, point){				if (point) {					this.panTo(point);					f['geo[lng]'].value = point.lng();					f['geo[lat]'].value = point.lat();				}			});		}		//polyline assistant		if (a == 'polyline'){			var f = $('edit-polyline-form');			alert ('Polyline drawing assistant activated for '+ f.title.value + ' polyline. \n Click to Draw!');						this.bModPData = f.edit; 			this.bLastpoint = null;			this.bTempPoints = [];			this.bTP = false;	// = new GPolyline(this.bTempPoints,"#0000FF", 2, 1);			//this.Map.map.addOverlay(bTP);		//create polyline object from points and add to map			ref = this;						this.bAssistant = GEvent.addListener(this.Map.map, "click", function(overlay,point) {				if (point) {					if(ref.bLastpoint && ref.bLastpoint.x == point.x && ref.bLastpoint.y == point.y) return;					ref.bLastpoint = point;					ref.bTempPoints.push(point);					if (ref.bTP){						this.removeOverlay( ref.bTP );					}					if (ref.bTempPoints.length){						var opts = (f.type.options[1].selected)?{geodesic:true}:null;						ref.bTP = new GPolyline(ref.bTempPoints,"#0000FF", 2, 1, opts)						this.addOverlay( ref.bTP );					}					for(var i=0; i<ref.bTempPoints.length; i++){						if (i == 0){							msg = ref.bTempPoints[i].y + ', ' + ref.bTempPoints[i].x;						}else{							msg += ', ' + ref.bTempPoints[i].y + ', ' + ref.bTempPoints[i].x;						}					}					f.edit.value = msg;				}			});		}				//polygon assistant		if (a == 'polygon'){			this.bModForm = $('polygonform_'+b);						if (this.bModForm.circle.options[this.bModForm.circle.selectedIndex].value == 'true'){				this.bModPData = this.bModForm.circle_center;				alert ('Circle-Center drawing assistant activated for '+ this.bModForm.name.value + ' polygon. \n Click to marker the center of your circle!');								this.bAssistant = GEvent.addListener(this.Map.map, "click", function(overlay, point){					if (point) {						this.Map.map.panTo(point);						this.bModPData.value = point.lng() + ", " + point.lat();					}				});			}else{				this.bModPData = this.bModForm.points_data; 				alert ('Polygon drawing assistant activated for '+ this.bModForm.name.value + ' polygon. \n Click to draw the outline. \n\nThe final connection will automatically be \ncompleted for you, so don\'t worry about that.');				this.bLastpoint = null;				this.bTempPoints = [];				this.bTP = new GPolyline(this.bTempPoints);				this.Map.map.addOverlay(bTP);		//create polyline object from points and add to map								this.bAssistant = GEvent.addListener(this.Map.map, "click", function(overlay,point) {					if(this.bLastpoint && this.bLastpoint.x==point.x && this.bLastpoint.y==point.y) return;					this.bLastpoint = point;										this.bTempPoints.push(point);					this.Map.map.removeOverlay(this.bTP);					this.bTP = new GPolyline(this.bTempPoints);					this.Map.map.addOverlay(this.bTP);					alert('in ast');					for(var i=0; i<this.bTempPoints.length; i++){						if (i == 0){							msg = this.bTempPoints[i].y + ', ' + this.bTempPoints[i].x;						}else{							msg += ', ' + this.bTempPoints[i].y + ', ' + this.bTempPoints[i].x;						}					}										this.bModPData.value = msg;				});			}		}	},
meta: 1713	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1713/7224e410de93e584d613873115dcc678658cdda7/Edit.js/clean/templates/Edit.js