diff --git a/viewer/js/config/viewer.js b/viewer/js/config/viewer.js index 8ed10af85..b22497e15 100644 --- a/viewer/js/config/viewer.js +++ b/viewer/js/config/viewer.js @@ -124,11 +124,17 @@ define([ id: 'louisvillePubSafety', opacity: 1.0, visible: true, - imageParameters: buildImageParameters() + imageParameters: buildImageParameters({ + layerIds: [0, 2, 4, 5, 8, 10, 12, 21], + layerOption: 'show' + }) }, identifyLayerInfos: { layerIds: [2, 4, 5, 8, 12, 21] }, + layerControlLayerInfos: { + layerIds: [0, 2, 4, 5, 8, 9, 10, 12, 21] + }, legendLayerInfos: { layerInfo: { hideLayers: [21] diff --git a/viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js b/viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js index 2631e34ba..8c949d037 100644 --- a/viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js +++ b/viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js @@ -35,6 +35,10 @@ define([ _expandClickHandler: null, postCreate: function () { this.inherited(arguments); + // Should the control be visible or hidden? + if (this.control.controlOptions.layerIds && this.control.controlOptions.layerIds.indexOf(this.sublayerInfo.id) < 0) { + domClass.add(this.domNode, 'layerControlHidden'); + } var checkNode = this.checkNode; domAttr.set(checkNode, 'data-sublayer-id', this.sublayerInfo.id); domClass.add(checkNode, this.control.layer.id + '-layerControlSublayerCheck'); diff --git a/viewer/js/gis/dijit/LayerControl/controls/_DynamicSublayer.js b/viewer/js/gis/dijit/LayerControl/controls/_DynamicSublayer.js index cbe35b987..2f545c073 100644 --- a/viewer/js/gis/dijit/LayerControl/controls/_DynamicSublayer.js +++ b/viewer/js/gis/dijit/LayerControl/controls/_DynamicSublayer.js @@ -45,6 +45,10 @@ define([ _expandClickHandler: null, postCreate: function () { this.inherited(arguments); + // Should the control be visible or hidden? + if (this.control.controlOptions.layerIds && this.control.controlOptions.layerIds.indexOf(this.sublayerInfo.id) < 0) { + domClass.add(this.domNode, 'layerControlHidden'); + } var checkNode = this.checkNode; domAttr.set(checkNode, 'data-sublayer-id', this.sublayerInfo.id); domClass.add(checkNode, this.control.layer.id + '-layerControlSublayerCheck'); diff --git a/viewer/js/gis/dijit/LayerControl/css/LayerControl.css b/viewer/js/gis/dijit/LayerControl/css/LayerControl.css index f805803da..2a09ad53e 100644 --- a/viewer/js/gis/dijit/LayerControl/css/LayerControl.css +++ b/viewer/js/gis/dijit/LayerControl/css/LayerControl.css @@ -67,6 +67,13 @@ text-align: center; } +.layerControlDijit .layerControlHidden { + display: none; +} +.layerControlDijit .layerControlVisible { + display: block; +} + .layerControlDijit .layerControlIndent { padding-left: 22px; }