Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching on Dynamic-Sublayer in LayerControl results in drawing all sublayers #26

Closed
adegwerth opened this issue Dec 1, 2017 · 2 comments

Comments

@adegwerth
Copy link

adegwerth commented Dec 1, 2017

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
@adegwerth adegwerth changed the title Switching on Dynamic-Sublayer in LayerControl reslts in drawing all sublayers Switching on Dynamic-Sublayer in LayerControl results in drawing all sublayers Dec 2, 2017
@adegwerth
Copy link
Author

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.

@tmcgee
Copy link
Member

tmcgee commented Dec 4, 2017

@adegwerth Yep. Myself and others have seen this same thing. I believe it is a bug in Web App Builder.

@tmcgee tmcgee closed this as completed Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants