Select to view content in your preferred language

Hide SubLayer from AGSJS TOC

626
1
Jump to solution
01-07-2013 03:40 AM
CraigMcDade
Deactivated User
I have a service with two layers. Using the AGSJS TOC widget is there a way to hide one layer from the TOC (not the map), while still keeping the 2nd layer in the service within the TOC and able to be turned on and off?
0 Kudos
1 Solution

Accepted Solutions
NianweiLiu
Frequent Contributor
I have a service with two layers. Using the AGSJS TOC widget is there a way to hide one layer from the TOC (not the map), while still keeping the 2nd layer in the service within the TOC and able to be turned on and off?

You can try using CSS styles, find the node id for that layer, then hide it in CSS. Not 100% dynamic, but easy to implement.

View solution in original post

0 Kudos
1 Reply
NianweiLiu
Frequent Contributor
I have a service with two layers. Using the AGSJS TOC widget is there a way to hide one layer from the TOC (not the map), while still keeping the 2nd layer in the service within the TOC and able to be turned on and off?

You can try using CSS styles, find the node id for that layer, then hide it in CSS. Not 100% dynamic, but easy to implement.
0 Kudos