planetfederal / GeoExplorer

Notice: This application has been folded into the OpenGeo Suite repository
https://github.com/opengeo/suite/blob/dev/geoexplorer/README.md
BSD 3-Clause "New" or "Revised" License
78 stars 60 forks source link

Always on Top behaviour of layers #13

Open teamgeo opened 12 years ago

teamgeo commented 12 years ago

Hello all,

OpenLayers doesn't have a possibility to put layers always on top. Therefore we are experimenting within GeoExplorer to reach this effect.

By default, two treenodes are present in the layertree: baselayers and overlays

We have made an extra treenode on top of the overlays, called pointers. So, we now have three treenodes:

pointers overlays baselayers

Layers we want to be always on top are put into this pointers node. When we add other layers, then they are put automatically into the overlays node. Visually, the other layers are inserted between the baselayers and the pointers. So, in the layertree the order of the layers is how we want it to be. So far, so good.

In the legend however the other layers are put on top of the existing layers, including the pointers. The legend is leading because the other layers are drawn on top of the pointers in the map.

Our questions :

  1. layertree and legend don't always show the same order of layers, is this correct behaviour of GeoExplorer ?
  2. is there a way to achieve Always On Top behaviour ?

greetings,

Barent Brouwers

The Netherlands