开发者

Remove markers from a GMapPanel version 3. ExtJS

开发者 https://www.devze.com 2023-02-22 03:54 出处:网络
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

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();

0

精彩评论

暂无评论...
验证码 换一张
取 消