百度地图 - 点聚合 - Marker设置Lable
2018-01-16 本文已影响0人
Arvin627
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
};