Can't access "visible" property in allSubLayers property

1309
10
Jump to solution
01-30-2019 08:38 AM
BrianVan_Nostrand
New Contributor III

Hi all,

 

I'm trying to hit the properties of the sublayers in a map image service using the "allSublayers" property of that service. It works fine in the console in Chrome:

 

 allSublayers output

 

I can hit each of these items and access the properties of each:

 

allSublayers index

 

But when I try to hit the same in code, using the same syntax, but targeting a new MapLayer object that's being added to the map, I can only see up to the array of sublayers itself, and not access any of the records in that array, nor the properties of any of those records:

asdasd

Looking for the items array

 

items array

the returned items array

 

 

Items Index

looking for the first record in that array

 

undefined

"undefined"

 

Any ideas? Is this some bug or something?

 

Thanks!

0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus

OK

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

0 Kudos