Closed Nikitoring closed 3 years ago
Hello @Nikitoring , something wrong with your demo
In my demo I don't see any problems with synchroniation between drawend and drawn features array. https://jsfiddle.net/ghettovoice/Ln9qr135/110/
Can you fix your demo?
Hello, @ghettovoice I fixed my demo https://codesandbox.io/s/drawendvuelayers-cflg9?file=/src/components/Map.vue It works if my drawend function looks like:
const endDraw = ({ json }) => {
console.log("new feature", json);
console.log("drawn features", drawFeaturesFrom);
};
But newFeature is undefined
Thanks a lot
It works when drawn features is more one
@Nikitoring
This part is for v0.12.x.
({ json }) => {
console.log("new feature", json);
console.log("drawn features", drawFeaturesFrom);
};
But as I understand you are using v0.11.x. And there was a bug, thanks for report! Upgrade to the v0.11.29
Example of my code https://codesandbox.io/s/drawendvuelayers-cflg9?file=/src/App.vue emit
drawend
doesn't change drawFeaturesFrom array. When I don't use composition-api, emitdrawend
changes array if there are more than one drawn features