Select to view content in your preferred language

LayerListWidget - Order of the operational layers

2461
4
Jump to solution
04-18-2013 01:14 PM
ShaningYu
Honored Contributor
In the config.xml, I loaded the operational layers in the sequence of image layers first and then feature layers followed in order to allow feature layers are above the image layers.  In the LayerListWidget, it displays the first loaded layers (image layers here) on the top.  How can I change the sequence oppositely?  Thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor
In the config.xml, I loaded the operational layers in the sequence of image layers first and then feature layers followed in order to allow feature layers are above the image layers. In the LayerListWidget, it displays the first loaded layers (image layers here) on the top.   How can I change the sequence oppositely? Thanks.


I guess to actually answer the question you asked, "reverse the order that you are loading them in the config.xml" would do it.

However, I'm not sure I understand. Are you saying that the order in the LayerList is not representative of the display order? I.e., layers in the layer list that are "above" other layers, should draw "over" other layers as well. If your map doesn't work this way, then something is wrong. If it does, then the order represented in the layer list is the inverse of the listing order in the operational layers section, so you should be able to order them under/above any others that you want just by changing the order in config.xml.

R_

View solution in original post

0 Kudos
4 Replies
RhettZufelt
MVP Notable Contributor
Have you modified your layerlistwidget somehow?

In mine, the order that they appear in the layerlist is the order of drawing (layers at bottom of list are drawn under layers above it).

So, if I load my images first (at the top of the operational layers list in config.xml), they show at the bottom of the layerlist, and under any other layers added afterwards (lower down in the operational layers list).

R_
0 Kudos
ShaningYu
Honored Contributor
Your statement is right.  If the image operational layer is loaded last, it will be the 1st on the layerlist, but it will also be on the top of others and make other layers not well visible unless the image layer's alpha is set to a low value.
0 Kudos
RhettZufelt
MVP Notable Contributor
In the config.xml, I loaded the operational layers in the sequence of image layers first and then feature layers followed in order to allow feature layers are above the image layers. In the LayerListWidget, it displays the first loaded layers (image layers here) on the top.   How can I change the sequence oppositely? Thanks.


I guess to actually answer the question you asked, "reverse the order that you are loading them in the config.xml" would do it.

However, I'm not sure I understand. Are you saying that the order in the LayerList is not representative of the display order? I.e., layers in the layer list that are "above" other layers, should draw "over" other layers as well. If your map doesn't work this way, then something is wrong. If it does, then the order represented in the layer list is the inverse of the listing order in the operational layers section, so you should be able to order them under/above any others that you want just by changing the order in config.xml.

R_
0 Kudos
ShaningYu
Honored Contributor
Robert:
Your are right.  Thanks.
Shaning
0 Kudos