[OpenLayers-Dev] removeLayer issue?
Eric Lemoine
eric.c2c at gmail.com
Sat Oct 13 17:35:10 EDT 2007
Hi
Map.removeLayer() moves layers in the Map.layers array, but do not
change these layers' z-index values. Can't this cause problems, or at
least unexpected behavior from the OpenLayers user standpoint?
Example scenario:
Initial state: the map has one baselayer.
(1) add 3 overlays to the map. Overlay A gets z-index 330. Overlay B
gets z-index 335. Overlay C gets z-index 340
(2) remove Overlay A and Overlay B from the map
(3) add Overlay D. Overlay D's layer index is 2 so it gets z-index 335.
Overlay D's z-index (335) is lower than Overlay C (340), even though
Overlay D was added after Overlay C.
Do you think this deserves a ticket and a fix?
--
Eric
More information about the Dev
mailing list