Using the example below, from the CMV, what would be the best way to not show the Fire Stations layer in the Louisville Public Safety map service assuming I wanted to see everything else and I wanted sublayertoggle true?
type: 'dynamic',
url: 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyOperationalLayers/MapServer',
title: 'Louisville Public Safety',
slider: true,
noLegend: false,
collapsed: false,
sublayerToggle: true, //true to automatically turn on sublayers
options: {
id: 'louisvillePubSafety',
opacity: 1.0,
visible: true,
imageParameters: imageParameters
},
identifyLayerInfos: {
layerIds: [2, 4, 5, 8, 12, 21]
}
I've added these 3 lines after the declaring and setting of imageParameters
:
var imageParameters2 = new ImageParameters(); imageParameters2.layerIds = [1]; imageParameters2.layerOption = ImageParameters.LAYER_OPTION_EXCLUDE;
and changed imageParameters: imageParameters
to imageParameters: imageParameters2
in the layer config but the Fire Station layer still shows up.
No comments:
Post a Comment