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

cascading getLegendGraphic #3923

Closed
mapserver-bot opened this issue Apr 4, 2012 · 3 comments
Closed

cascading getLegendGraphic #3923

mapserver-bot opened this issue Apr 4, 2012 · 3 comments

Comments

@mapserver-bot
Copy link

Reporter: stetou
Date: 2011/06/16 - 20:27
Trac URL: http://trac.osgeo.org/mapserver/ticket/3923
I have several external WMS layers in my mapfile, using

...
CONNECTION "xxxxxxx" 
CONNECTIONTYPE WMS 
...

I use geoext layertree and would like to show the legend of the external WMS layers in the tree.
Currently I ask the provider for the CLASS definition of the layers and paste it in my mapfile.
Is there already another way to get the legend of a remote WMS layer?
If not, would it be a possible enhancement?

@mapserver-bot
Copy link
Author

Author: dmorissette
Date: 2011/06/17 - 15:39
I confirm that cascading of GetLegendGraphic is not currently supported.

With respect to adding this, I'm not clear on what could be done and how much work would be involved... we'd have to find/take some time to look into our options.

@mapserver-bot
Copy link
Author

Author: aboudreault
Date: 2011/09/28 - 16:39
Fixed and committed in c970d71 (r12592).

A '''GetLegendGraphic''' request will be cascaded ''if'':

  • The request is enabled via the *_enable_request metadatas.
  • The layer do not contain '''any''' class with the '''name''' property. This is to keep the current GetLegendGraphic behavior on a WMS layer. So, a layer with a similar class:
  CLASS
    NAME "near white"
    EXPRESSION ([red] > 200 AND [green] > 200 AND [blue] > 200)
    STYLE
      COLOR 0 255 0
    END
  END

won't be cascaded. The legend returned will use that class. Remove/comment the '''NAME "near white"''' line and it will be cascaded.

'''NOTE''': If you know that the external WMS layer do not support GetLegendGraphic, you'll have to disable manually the GetLegendGraphic for your layer using the *_enable_request metadata. Otherwise... you will simply get the XML exception from the cascaded server.

@mapserver-bot
Copy link
Author

Author: dmorissette
Date: 2011/10/07 - 04:25
Docs update in SVN trunk MapServer/MapServer-documentation@ea95be0 (r12628).

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

No branches or pull requests

1 participant