如何从Google Map(Ionic4)中删除标记簇
零件代码流程:
从'node-js-marker-clusterer'导入*作为MarkerClusterer;
markerCluster:MarkerClusterer;
if (this.markerCluster) {
this.markerCluster.clearMarkers();
}
this.markerCluster = this.map.addMarkerClusterSync({
markers: this.locations,
boundsDraw: false,
icons: [
{min: 2, max: 100, url: "./assets/icon/favicon.ico", anchor:
{x: 16, y: 16}}
]
});
this.markerCluster.clearMarkers(); ←此代码不起作用