Select to view content in your preferred language

The Legend Control and ArcGISDynamicMapServiceLayer LayerInfo property

678
1
05-18-2012 10:51 AM
LanceCrumbliss
Frequent Contributor
OK, here goes......

How can I get the ID member (an Integer) of the LayerInfo Property of an ArcGISDynamicMapServiceLayer's selected SubLayer in the Legend Control when clicked?  Not the String used to ID the ArcGISDynamicMapServiceLayer in the Map Control, but the ID of one of the ArcGISDynamicMapServiceLayer's SubLayers, which is an Integer.  When the checkbox is clicked, I'm looking through the DataContext but I've had no luck...

(The term "SubLayer" may be inaccurate...I'm speaking of the layer(s) within the ArcGISDynamicMapServiceLayer itself, ie a shapefile in the mapservice.)

Wow...even I know what I'm asking and that's a confusing question.  Here's a pic.  In this example the ID member of the LayerInfo property would be 0.
0 Kudos
1 Reply
LanceCrumbliss
Frequent Contributor
gah...i think i found it...SubLayerID in the LayerItemViewModel.

EDIT:  Yep, that's it!
0 Kudos