网格地图
This commit is contained in:
@@ -62,7 +62,8 @@ export default {
|
|||||||
treeList: [],
|
treeList: [],
|
||||||
showSelect: false,
|
showSelect: false,
|
||||||
editor: null,
|
editor: null,
|
||||||
polygons: []
|
polygons: [],
|
||||||
|
labels: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user', 'config'])},
|
computed: {...mapState(['user', 'config'])},
|
||||||
@@ -134,7 +135,11 @@ export default {
|
|||||||
const colors = ["#A194F4", "#7CBDF3", "#F3A57D", "#62D063", "#58DBDA", "#F7D151"]
|
const colors = ["#A194F4", "#7CBDF3", "#F3A57D", "#62D063", "#58DBDA", "#F7D151"]
|
||||||
if (this.polygons.length > 0) {
|
if (this.polygons.length > 0) {
|
||||||
this.polygons.forEach(e => e.destroy())
|
this.polygons.forEach(e => e.destroy())
|
||||||
|
this.labels.forEach(e => {
|
||||||
|
e.destroy(e.id)
|
||||||
|
})
|
||||||
this.polygons = []
|
this.polygons = []
|
||||||
|
this.labels = []
|
||||||
}
|
}
|
||||||
if (paths?.length > 0) {
|
if (paths?.length > 0) {
|
||||||
let bounds = []
|
let bounds = []
|
||||||
@@ -186,6 +191,7 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
this.labels.push(label)
|
||||||
label.on('click', e => {
|
label.on('click', e => {
|
||||||
this.getGridInfo(e.target.id.split('~')[1])
|
this.getGridInfo(e.target.id.split('~')[1])
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user