Hide SubLayer from AGSJS TOC

446
1
Jump to solution
01-07-2013 03:40 AM
CraigMcDade
Occasional Contributor III
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
Occasional Contributor II
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
Occasional Contributor II
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