Describe the bug:
When a layer is removed via the toc_entry_actions_popover or a layer preview is canceled the layer is cleaned up correctly but the source isn't ever removed leading to orphaned sources.
Not a huge issue because I am able to work around it. 99.9% of developers would never encounter this.
But it forces me to reach into maplibre and utilize a private property to determine if the layer has been removed but the source is still present.
Steps to reproduce:
- create a layer
- cancel the layer
- check
mbmap.getSource(sourceid) and the source is still there.
Expected behavior:
source to be removed when layer is removed.
Describe the bug:
When a layer is removed via the toc_entry_actions_popover or a layer preview is canceled the layer is cleaned up correctly but the source isn't ever removed leading to orphaned sources.
Not a huge issue because I am able to work around it. 99.9% of developers would never encounter this.
But it forces me to reach into maplibre and utilize a private property to determine if the layer has been removed but the source is still present.
Steps to reproduce:
mbmap.getSource(sourceid)and the source is still there.Expected behavior:
source to be removed when layer is removed.