EOX-A / EOxElements

A Web Component collection of geospatial UI elements, crafted by EOX.
https://eox-a.github.io/EOxElements/
MIT License
13 stars 2 forks source link

Nested layers order #1251

Closed A-Behairi closed 4 weeks ago

A-Behairi commented 2 months ago

Nested layers inside group layers gets reversed sometimes. In my case this happened in eodash, to investigate this further I debugged oldLayers & newLayers inside set layers property.

in the following image the map renders the layers in the right order

Screenshot 2024-09-11 at 13 09 50

and the wrong order in this case:

Screenshot 2024-09-12 at 16 51 53

although the layers passed have the same order

silvester-pari commented 1 month ago

There was some issue in the past where actually the layercontrol did influence the layers in the map, so just to rule that out, could you try these layers without layercontrol and see if it also happens @A-Behairi ?

A-Behairi commented 1 month ago

The layercontrol was removed in the explained example, I think it's more related to the sorting and reversing of the layers in the map.

silvester-pari commented 4 weeks ago

Fixed in https://github.com/EOX-A/EOxElements/pull/1321