Select to view content in your preferred language

Laylist - Sublayers

1396
9
Jump to solution
07-03-2012 04:14 AM
ShaningYu
Honored Contributor
From the Laylist widget, how can it be enhanced to check on/off sublayers provided by each mapservice?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DasaPaddock
Esri Regular Contributor
You can't turn the layers on and off if you're using a cached map service unless it's a 10.1 server and you've enabled dynamic layers on the service.

View solution in original post

0 Kudos
9 Replies
philippschnetzer
Frequent Contributor
If you mean by default when the map first loads they are set in the MXD (whatever is showing visible in the MXD will be shown as checked in the layer list widget).  I don't think there is a way to individually specify whether a layer/sublayer is checked on/off from within the widget itself.
0 Kudos
DasaPaddock
Esri Regular Contributor
0 Kudos
ShaningYu
Honored Contributor
dpaddock:  Thanks for your response.  Could you provide some details that are specific?
0 Kudos
DasaPaddock
Esri Regular Contributor
"visiblelayers" should be a list of sublayer ids that you want on by default.

e.g.,

visiblelayers="4,7"
0 Kudos
ShaningYu
Honored Contributor
In the config.xml, I did like that:
            <layer label="Butler, PA - Vectors" type="tiled" visible="true"
                   url="http://10.74.44.31:6080/arcgis/rest/services/Butler/Butler_1/MapServer"
                   visiblelayers="2,3" />
But there is nothing different from that w/o visiblelayers="2,3".
0 Kudos
DasaPaddock
Esri Regular Contributor
"visiblelayers" only applies to to layer types dynamic, arcims, and wms.
0 Kudos
ShaningYu
Honored Contributor
You mean that philipp schnetzer's response is right - can't check on/off the layers defined in mapservices.  Thanks.
0 Kudos
DasaPaddock
Esri Regular Contributor
You can't turn the layers on and off if you're using a cached map service unless it's a 10.1 server and you've enabled dynamic layers on the service.
0 Kudos
ShaningYu
Honored Contributor
You are right - Since they are cached map services, I can't turn on/off the layers.  Thanks.
0 Kudos