You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When changing the route of an Angular (8) application back to the map component/page the draw end event doesn't work as expected. On the draw end event the map suddenly disappears until the mouse is moving.
I believe this is a bug related to the fact that the same layers (both image and vector) are added to several maps successively when you change the route. After the initial load the map behaves fine, the problem appears when switching route at least once, which means a new map is created but the same layer reused. IMO it should be supported by the library but apparently isn't... I'm labelling as bug for this reason (but I may be wrong, this needs a bit more investigation).
I met the same bug in Vue & Vue-router project too.
Inspired by what @jahow said, I tried to call removeLayer on the map instance before component destroyed, and find it useful to aviod map flash.
When changing the route of an Angular (8) application back to the map component/page the draw end event doesn't work as expected. On the draw end event the map suddenly disappears until the mouse is moving.
Stackblitz Example:
https://stackblitz.com/edit/angular-ol6-drawbug
Reproduce with Stackblitz:
I don't know whether it's a problem of Openlayers (6) or Angular (8)...
The text was updated successfully, but these errors were encountered: