Show only visible layers from map in a div

1415
1
Jump to solution
08-15-2016 10:20 PM
DeepikaJain1
New Contributor

Hi folks

I need to show only visible layers at a particular scale from the web map in a div...any idea how can I get the visible layers from webmap at a particular scale. I am using ArcGIS webappbuilder 1.2 and ArcGIS JavaScript api 3.17.

Thanks

Deepika

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Deepika,

   You will need to use the LayerInfos class and the example in the docs constructor to get all the layers in the map and then each layer will have a isvisibleatscale method that you can call on the layer object.

View solution in original post

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Deepika,

   You will need to use the LayerInfos class and the example in the docs constructor to get all the layers in the map and then each layer will have a isvisibleatscale method that you can call on the layer object.

0 Kudos