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
};
网友评论