Is there a way to remove markers from a GMapPanel? I was looking through the GMapPanel code and only saw a function that hides the markers on the map. 开发者_如何转开发I'm trying to remove markers so i can re populate the map with new markers.
part of this link :
addMarker : function(point, marker, clear, center, listeners){
Ext.applyIf(marker,G_DEFAULT_ICON);
if (clear === true){
this.getMap().clearOverlays();
}
if (center === true) {
this.getMap().setCenter(point, this.zoomLevel);
}
var mark = new GMarker(point,marker);
if (typeof listeners === 'object'){
for (evt in listeners) {
GEvent.bind(mark, evt, this, listeners[evt]);
}
}
this.getMap().addOverlay(mark);
},
it appears that .addMarker(false, false, true, false, false);
or try calling: this.getMap().clearOverlays();
精彩评论