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