Select to view content in your preferred language

Scale Dependent Sublayers On/Off Difficulty

1820
0
06-27-2012 04:17 PM
ElisabethvanderLeeuw
Emerging Contributor
Maybe someone can suggest an easier way of doing this.  I have scale dependent sublayers for the same layer (symbolized differently depending on scale).  I've flagged 'only show visible layers' - so the user only sees one layer at a time.  When the user turns the layer on/off the other sublayers (based on the same layer) do not change visibility. 

I have been trying to create a behavior which would turn the other related sublayers on/off. 

ArcGISDynamicMapServiceLayer agsDynamicLayer = (layer as ArcGISDynamicMapServiceLayer);

agsDynamicLayer.VisibilityChanged += new EventHandler<EventArgs>(ArcGISDynamicMapServiceLayer_SubLyVisibilityChanged);

How can I tell which of the corresponding sublayers was the one that triggered the EventHandler - so I can flag the other related sublayers?? and how would I change visibility in the code and uncheck the hidden sublayers in the table of contents?

thanks,

Elisabeth
0 Kudos
0 Replies