Select to view content in your preferred language

A legend with a subset of a dynamic layer

764
3
Jump to solution
05-21-2012 05:32 AM
ionarawilson1
Deactivated User
What would be the expression to just show a subset of a dynamic layer in a legend?
The layers property seems to be a good option but how do I use it?

For example if I have myLegend.layers = [dynamicLayer],

How do I change the expression to show only the first two or the last two layers of a service containing 4 layers?

Thank you!!!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ionarawilson1
Deactivated User
Thank you Ivan!!!

View solution in original post

0 Kudos
3 Replies
IvanBespalov
Frequent Contributor
use visibleLayers property
dynamicLayer.visibleLayers = new ArrayCollection([0, 1]);

sample here
0 Kudos
ionarawilson1
Deactivated User
Thank you Ivan!!!
0 Kudos
ionarawilson1
Deactivated User
Thank you again Ivan! I finished my project and will be soon posting at the code gallery! Cheers!!!
0 Kudos