提交 8b36a507 编写于 作者: d-u-a's avatar d-u-a

fix: map 更新 marker 影响 polyline 的问题

上级 9f180ea7
......@@ -320,11 +320,18 @@ export default {
nativeMap.__markers__[id + ''] = nativeMarker
})
},
_clearMarkers () {
const map = this.map
const data = map.__markers__
for (const key in data) {
map.removeOverlay(data[key])
}
map.__markers__ = {}
},
_addMarkers (markers, clear) {
if (this.map) {
if (clear) {
this.map.clearOverlays()
this.map.__markers__ = {}
this._clearMarkers()
}
markers.forEach(marker => {
this._addMarker(this.map, marker)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册