BUG 29970
This commit is contained in:
@@ -81,7 +81,6 @@ export default {
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
let {polyEditor} = this
|
let {polyEditor} = this
|
||||||
polyEditor.close();
|
polyEditor.close();
|
||||||
polyEditor.setTarget();
|
|
||||||
polyEditor.open();
|
polyEditor.open();
|
||||||
},
|
},
|
||||||
initMap() {
|
initMap() {
|
||||||
@@ -115,8 +114,10 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.polyEditor.on('end', ({target}) => {
|
this.polyEditor.on('end', ({target}) => {
|
||||||
|
if (target) {
|
||||||
this.overlays.push(target);
|
this.overlays.push(target);
|
||||||
this.points.push(target.getPath().map((e) => ({lat: e.getLat(), lng: e.getLng()})))
|
this.points.push(target.getPath().map((e) => ({lat: e.getLat(), lng: e.getLng()})))
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (this.value?.length > 0) {
|
if (this.value?.length > 0) {
|
||||||
let path = this.value.map(e => [e.lng, e.lat]);
|
let path = this.value.map(e => [e.lng, e.lat]);
|
||||||
|
|||||||
Reference in New Issue
Block a user