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

Initial set of layers for Identify Tool are not correct #367

Closed
msereda opened this issue Jan 29, 2015 · 9 comments · Fixed by #604
Closed

Initial set of layers for Identify Tool are not correct #367

msereda opened this issue Jan 29, 2015 · 9 comments · Fixed by #604
Assignees
Labels

Comments

@msereda
Copy link
Contributor

msereda commented Jan 29, 2015

Has anyone run into any issues with the identify dropdown showing layers that shouldn't be available for identify (ie non-visible layers)?

Here's my initial structure from the LayerControl:

layercontrol

^ The layer in red shows up in the identify dropdown, and is available to be identified on at startup. It is not visible on the map itself , but if I console.log the current visible layers the layer in question is showing as visible.

That being said, if I make a change to the LayerControl by flipping any layer on/off, the LayerControl appears to set all layers to how they should be, and the Identify tool works fine at that point. I can see some comments in the LayerControl code referencing "ags doesn't respect a layer group's visibility", but the code there seems fairly specific to the LayerControl so I'm not sure how I'd make that work for Identify.

Anyone else run into this issue? Kinda feels like an API bug, but I'm hoping someone's worked around it for Identify.

@GilbertLasnier
Copy link

You are right when you are under a group the identify doesnot work for me also.... I remake all my services without the sub group

@tmcgee
Copy link
Member

tmcgee commented Feb 2, 2015

@msereda what does the JSON config in viewer.ls for this dynamic layer look like? Are you including ImageParameters?

@msereda
Copy link
Contributor Author

msereda commented Feb 3, 2015

@tmcgee I took a copy of the untouched CMV from here and just added in the service - is this what you're looking for ?

        {
            type: 'dynamic',
            url: 'http://server-name/arcgis/rest/services/service-dir/service-name/MapServer',
            title: 'My Title',
            slider: true,
            noLegend: false,
            collapsed: false,
            sublayerToggle: true,
            options: {
                id: 'MyID',
                visible: true,
                imageParameters: imageParameters
            },
            layerControlLayerInfos: {
                expanded: true
            }
        }

@GilbertLasnier
Copy link

I think you are right again we don’t have the variable slider true it’s for that Its does not work , you are great
From: msereda [mailto:notifications@github.com]
Sent: Tuesday, February 03, 2015 2:16 PM
To: cmv/cmv-app
Cc: Lasnier, Gilbert
Subject: Re: [cmv-app] Initial set of layers for Identify Tool are not correct (#367)

@tmcgeehttps://github.com/tmcgee I took a copy of the untouched CMV from here and just added in the service - is this what you're looking for ?

    {

        type: 'dynamic',

        url: 'http://server-name/arcgis/rest/services/service-dir/service-name/MapServer',

        title: 'My Title',

        slider: true,

        noLegend: false,

        collapsed: false,

        sublayerToggle: true,

        options: {

            id: 'MyID',

            visible: true,

            imageParameters: imageParameters

        },

        layerControlLayerInfos: {

            expanded: true

        }

    }


Reply to this email directly or view it on GitHubhttps://github.com//issues/367#issuecomment-72714851.

@tmcgee
Copy link
Member

tmcgee commented Feb 4, 2015

@msereda ok. then it is what I thought it might be. I've seen something similar when you include "layerOptions" like show/hide/exclude for the operational layer. The Layer Control then shows a similar inconsistency. I don't think it is an issue with the Identify widget since if I recall correctly, it just reads the visibleLayers array to determine which layers the API says are visible. I believe the Layer Control widget is doing the same thing with visibleLayers. I'll do some digging around. @btfou: Do you think this might be the same thing I've noted previously with the Layer Control?

@JurupaCommunity
Copy link

Is there solution to this issue? I have this issue as well. Please help.

@tmcgee
Copy link
Member

tmcgee commented Mar 5, 2015

@btfou Any thoughts on this?

@tmcgee
Copy link
Member

tmcgee commented Jul 15, 2015

@btfou ping

green3g added a commit to green3g/cmv-app that referenced this issue Sep 27, 2016
- when group layers are not visible, but child layers are, child layers are still identified
- cmv#367 and cmv#601
@green3g
Copy link
Member

green3g commented Oct 4, 2016

Should be closed in #604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants