修改电子围栏

master
夜笙歌 2 years ago
parent b2a22d7cff
commit 3dc23a0bb5

@ -134,7 +134,14 @@ const setPolygon = (res) => {
})
setMarker(marketPath.value)
}
const removePolygon = () =>{
let polygons = map.getAllOverlays('polygon');
console.log('s',polygons)
polygons.forEach(e=>{
// e.close()
})
}
let createPolygon = () => {
let arr = []
map.add([new AMap.Polygon({path: arr})]);
@ -147,7 +154,8 @@ let createPolygon = () => {
areaPath.value.push(data.target._opts.path)
// polyEditor.close();
// map.clearMap()
setPolygon(areaPath.value)
// removePolygon()
// setPolygon([data.target._opts.path])
})
polyEditor.on('addnode', function (data) {
//

Loading…
Cancel
Save