Ticket #1628 (closed feature: fixed)
removeLayer may break feature selection
|Reported by:||elemoine||Owned by:||ahocevar|
Removing a layer may prevent feature selection from working.
- add a base layer
- add a vector layer
- add overlay 1
- add overlay 2
- add a select feature control (here the vector layer's z-index is set to a high value so that feature selection work even though some overlays were added to the map after the vector layer)
- remove overlay 2
After the removal of overlay 2, every layer's z-index is reset (based on the layer idx). Thus, feature selection no longer works because the vector layer has been placed under overlay 1.