美文网首页
百度地图 - 点聚合 - Marker设置Lable

百度地图 - 点聚合 - Marker设置Lable

作者: Arvin627 | 来源:发表于2018-01-16 19:18 被阅读0次

MarkerClusterer_min.js

MarkerClusterer.js 修改

g.prototype.remove = function() {

    for (var j = 0, h; h = this._markers[j]; j++) {        

        var tmplabel = this._markers[j].getLabel();       

        this._markers[j].getMap() && this._map.removeOverlay(this._markers[j]);

        this._markers[j].setLabel(tmplabel);

    }

    this._map.removeOverlay(this._clusterMarker);

    this._markers.length = 0;

    delete this._markers

};

相关文章

网友评论

      本文标题:百度地图 - 点聚合 - Marker设置Lable

      本文链接:https://www.haomeiwen.com/subject/wbreoxtx.html