<map id="mapCtx" class="map-view" :style="'height:'+ windowHeight+'px;width:'+ windowWidth +'px;'"
:latitude="latitude" :longitude="longitude" :markers="markers" :polyline="polyline" :show-location="true" :show-compass="true"
:show-scale="true" :enable-poi="true" @markertap="onMarkertap" @tap="onPoitap"
@regionchange="onRegionchange"></map>
resetMarkers() {
this.markers = []
},
setMarkers(list = []){
this.markers = [];
setTimeout(() => {
this.markers = list
}, 100)
},
qjr
你好,同样的问题,
if(this.polylineList.length > 0){
this.polylineList.splice(0, this.polylineList.length)
this.markers.splice(0, this.markers.length)
console.log(this.polylineList,this.markers);
}
数组变空了,但是标记和线条还在地图上
2024-08-30 17:04