The Legend graphics URL of WMS layer can be found at the setting of WMS layer at Geoserver 

For example, here is a layer setting at layers.js in GLTG

  "properties": {
    "title": "River Reaches",
    "id": "gltg:gltg-pools",
    "wms": "https://gltg.ncsa.illinois.edu/geoserver/wms",
    "opacity": 0.9,
    "checked": false,
    "showLayerLegend": false,
    "layerLegendTitle": "",
    "layerLegendContents": ""
  }


In geoserver, get in "layers" setting (you can find it in the left side menu as shown below.


Find the layer with id, "gltg:gltg-pools", and click the the title of the layer.

The style setting is under "publishing" tab as shown below:

You can see a graphic image under "default style: gltg:pool". Right click on the image and copy the URL (in chrome, "copy image address"). 

The URL of the legend for the lyaer is as below:

https://greatlakestogulf.org/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&STRICT=false&style=gltg:pool

If the legend graphics is needed to be modified, you need to edit a style called, "gltg:pool".



  • No labels