Select to view content in your preferred language

Layer Reorder in TOC  and Map layers

722
1
06-24-2010 03:44 AM
LakshmananVenkatesan
Frequent Contributor
Hello All

I have already posted a question but I did not get a favourable results.

I have TOC which is similar to ESRI sample. Just a List box which binds visible layer list. All I wanted, I want to drag and drop the layer in TOC and map layer should reordered accordingly. In my xaml, I have one dynamic map service layer with 10 layers , a feature layer and couple of graphic layers.

I am trying reorder them in TOC and map should change the layer order accordingly.

How to achieve this?. Real quick help is required.

This thread http://forums.esri.com/Thread.asp?c=158&f=2455&t=301023&mc=1, does not helped me in great.

Regards
SR
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
1) It's not possible to reorder the sublayers coming from a dynamic map service layer, so you won't be able to reorder your 10 layers.

2) To reorder the main layers (i.e. your dynamic map service layer, your feature layer and your couple of graphic layers, you have to reorder the LayerCollection Map.Layers. I don't think it's possible to directly move a layer inside a LayerCollection but Remove + Insert(index) should make the job.
0 Kudos