Uploaded image for project: 'GeoServer'
  1. GEOS-7636

GetLegendGraphic ignores the OnlineResource configured in the style for raster layers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.13.3, 2.14.0, 2.15
    • Component/s: WMS
    • Labels:
      None

      Description

      It seems like a GetLegendGraphic call doesn't use the OnlineResource configured in a style.

      Sample steps to replicate it:

      1. put a legend.png in GEOSERVER_DATA_DIR/styles folder
      2. create a new "raster2" style copying it from the existing "raster" style and click on "addLegend"
      3. set legend.png on the Online Resource field and click on the "Auto-detect image size and type" link to automatically populate the other fields.
      4. Submit the style
      5. Create a new "raster" layer or simply modify an existing one
      6. Go to the publishing tab and scroll down to the "Default Style" drop down. Then select the raster2 style

      The legend icon won't change to the static image and you still see the standard blue icon
      Moreover after saving the layer config, a getLegendGraphic will still show the standard blue icon instead of the static image.

      http://localhost:8080/geoserver/wms?REQUEST=GetLegendGraphic&version=1.0.0&FORMAT=image/png&LAYER=raster

      (even specifying an additional &style=raster2 parameter won't make any difference).

      Some investigations have already been made on this:
      http://osgeo-org.1560.x6.nabble.com/Why-GetLegendGraphic-call-in-layer-publishing-tab-doesn-t-use-the-onlineResource-legend-td5256433.html

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dany111 Daniele Romagnoli
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: