|
|
@ -135,8 +135,8 @@ export class MarkerCluster { |
|
|
|
Vue.prototype.mapIns.removeLayerByName(id); |
|
|
|
} |
|
|
|
|
|
|
|
removeData(_id, data) { |
|
|
|
data.forEach((item, index) => { |
|
|
|
removeData(_id, _data) { |
|
|
|
_data.forEach((item, index) => { |
|
|
|
const findIndex = this.data.findIndex( |
|
|
|
(removeData) => removeData === item |
|
|
|
); |
|
|
@ -163,13 +163,17 @@ export class MarkerCluster { |
|
|
|
} |
|
|
|
if (findIndex > -1) this.data.splice(findIndex, 1); |
|
|
|
}); |
|
|
|
console.log('remove',_id,_data) |
|
|
|
Vue.prototype.mapIns.removeLayerByName(_id); |
|
|
|
if(_data && Array.isArray(_data) && _data.length > 0){ |
|
|
|
const self = this; |
|
|
|
setTimeout(() => { |
|
|
|
self.refreshLayer(_id, _data); |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
clear() { |
|
|
|
this.data = []; |
|
|
|
} |
|
|
|