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

Layer Control should use imageParameters on Dynamic layers #605

Open
green3g opened this issue Sep 27, 2016 · 4 comments
Open

Layer Control should use imageParameters on Dynamic layers #605

green3g opened this issue Sep 27, 2016 · 4 comments

Comments

@green3g
Copy link
Member

green3g commented Sep 27, 2016

I started looking into the sublayer visibility issue a little deeper and discovered yet another issue, this one with the layer control.

  1. On the latest develop version branch, if you zoom into Louisville (until you can see the smoke plume)
  2. toggle the Public safety layer ON and then OFF

Now there are less layers showing than when the app started. It appears the Emergency Operations layer is showing by default, but not checked in the layer control, and when another sublayer is toggled,

image

@tmcgee
Copy link
Member

tmcgee commented Sep 27, 2016

If I am understanding the issue correctly, this does not seem to occur in the demo app using the current 1.3.4 release of CMV with version 3.14 of the Esri JavaScript API. I am wondering if this a new issue introduced in the CMV develop branch if it was something introduced in a release of the API after version 3.14. If so, we should look at this along side #367 and #601 and determine if it is a CMV bug or an API bug/change.

@green3g
Copy link
Member Author

green3g commented Sep 27, 2016

Just looked into it a bit more, it seems to ONLY happen on that map service, at least with my testing. I can't reproduce it with my group layers/sub layers. Looking into the config a bit, I see we're using the ImageParameters function. This could be the cause.

Perhaps the layer control doesn't look at the property that the build image parameters is setting?

@green3g
Copy link
Member Author

green3g commented Oct 20, 2016

This is caused by the imageParameters. When imageParameters are passed to a dynamic layer they are not used when creating a layer control for the layer and sublayers.

@green3g green3g changed the title Layer Control sublayer visibility Layer Control should use imageParameters on Dynamic layers Oct 20, 2016
@green3g
Copy link
Member Author

green3g commented Oct 20, 2016

A quick fix though for my situation is to set:

            layerControlLayerInfos: {
                expanded: true,
                sublayers: false
            }

This hides all the other layers but shows the legends on the ones in image parameters.

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