Select to view content in your preferred language

visibleLayers property - Just what does this do to the layerInfos property?

723
3
01-06-2011 09:08 AM
DeonaEvans
Emerging Contributor
I have a layer that has 5 "sub-layers" - that is the map document that is served has 5 layers in it, none of which are visible at start - such that when I do a layerInfos property I get back an array of 5 elements.  Then, if I set the visibleLayers property and turn one of those layers on, when I get the layerInfos there is only 1 element returned in the array.  I thought layerInfos would remain the same for that ArcGISDynamicMapServiceLayer but apparently not.  Am I wrong here?
Tags (2)
0 Kudos
3 Replies
DasaPaddock
Esri Regular Contributor
Yes, the layerInfos should not change when you set the visibleLayers. Do you have a test case that demonstrates this issue? What version of the API are you using?
0 Kudos
DeonaEvans
Emerging Contributor
I may be on to the bug.....What would happen if I get the layerInfos from the layer and then modify that array?  That's probably not good is it?
0 Kudos
DasaPaddock
Esri Regular Contributor
Right, that would explain it.
0 Kudos