MelihAltintas / vue3-openlayers

Web map Vue 3.x components with the power of OpenLayers
https://vue3openlayers.netlify.app/
MIT License
679 stars 126 forks source link

No drawstart/drawend events are thrown after drawType Change #361

Closed fbatschi closed 2 months ago

fbatschi commented 3 months ago

Describe the bug

If an ol-interaction-draw interaction is used, only the drawType that is initially set throws events like drawstart and drawend. Once you change the drawType, no more events are thrown.

Affected version(s)

appears in latest version v10, havent tested other version

To Reproduce Steps to reproduce the behavior:

  1. Simply go to https://vue3openlayers.netlify.app/componentsguide/interactions/draw/ and use the first demo.
  2. Draw a polygon into the map
  3. once finished there is a event/feature output in the console.
  4. once you change the drawtype to another type like a point or circle, no more event output happens

Alternatively use the demo at https://vue3openlayers.netlify.app/componentsguide/mapcontrols/controlbar/ this should always drop events when drawing ends, but same result, only for the initially selected drawType.

Expected behavior There should always be the events thrown for drawstart or drawend