Switching on Dynamic-Sublayer in LayerControl results in drawing all sublayers
adegwerth opened this issue · 2 comments
I have a Dynamic Service (Regions_Zones) with the following structure:
- Regions (0)
- Region_A (1)
- Region_B (2)
- Region_C (3)
- Region_D (4)
- Zones (5)
- Zone_A (6)
- Zone_B (7)
- Zone_C (8)
- Zone_D (9)
If I select the layer (6) in the LayerControl the layer is checked, but all layers in the Zones Group are displayed on the map. The layerControl show only layer (6) as checked). If I debug this in the file Dynamic.js the setLayers variable contains the right value (6) but after the call setVisibleLayers the setLayers array contains now a lot more values (now 48 values) and all values are in the range from 5...9 which is the range from the group.
_setVisibleLayers: function () { // file: Dynamic.js
(203) layer.setVisibleLayers(setLayers);
(204) layer.refresh();
This behavior occurs only with the WAB integration. The standalone CMV works fine.
I cross-checked the following:
- cmv current development works as expected
- cmv 2.0.0 beta2 works as expected
Its seems that this comes from jimu.js\LayerInfos\LayerInfosForMapServices.js in line 875 there is a call
this.layerObject.setVisibleLayers
. If I uncomment this it works. But I don't really understand the impact.
@adegwerth Yep. Myself and others have seen this same thing. I believe it is a bug in Web App Builder.