[Geoserver-users] Managing legend in WMS tiled service

Hi all,

I am using “image” WMS decoration type to show the legend of NDVI rasters.

It works fine but as the client is required to use “tiled” services the legend is shown as many times as tiles are for that image, which is not what we want.

I tried with “legend” WMS decoration type too, but still does not work.

This is the layout I put in layouts folder in GeoServer data dir:

Thank you very much for your help,

Kind regards,

Alberto

Hi Alberto,
Yep, a

with a GetLegendGraphic (or even just a static if the legend is never going to change) would probably be ideal in this sort of scenario.

Cheers,
Jonathan

---- On Mon, 21 Mar 2016 16:32:45 +0000 Alberto Callejas Delgadoalberto.callejas@anonymised.com wrote ----

Hi Jonathan,

Thank you for your ideas, the client is using OpenLayers 3 so I am considering to use the second options. As you said, the layer can end up anywhere on the screen but maybe if they create a div container with the GetLegendGraphic URL the legend should looks ok?

Thank you,

Alberto

On 21 March 2016 at 15:02, Jonathan Moules wrote:

Hi Alberto,
I’m not sure this is possible with decorations. But two (non-ideal) alternative ways to try and get the same outcome:

  1. A second layer that you overlay client-side - the second layer would be requested as a non-tiled image.
  2. Creating a layer-group with a second layer which only contains your image as a repeating watermark. The downside is that from the users perspective the legend could end up anywhere on the screen
    .
    Cheers,
    Jonathan

---- On Mon, 21 Mar 2016 11:56:03 +0000 Alberto Callejas Delgado <alberto.callejas@anonymised.com> wrote ----

Hi all,

I am using “image” WMS decoration type to show the legend of NDVI rasters.

It works fine but as the client is required to use “tiled” services the legend is shown as many times as tiles are for that image, which is not what we want.

I tried with “legend” WMS decoration type too, but still does not work.

This is the layout I put in layouts folder in GeoServer data dir:

Thank you very much for your help,

Kind regards,

Alberto


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140_______________________________________________
Geoserver-users mailing list
Geoserver-users@anonymised.comrceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users