Questions tagged [getlegendgraphic]

GetLegendGraphic is a request operation for an OGC Web Map Service (WMS) that supports optional Styled Layer Descriptor (SLD) operations. The request returns a legend image for a layer (or group of layers) within a WMS.

Filter by
Sorted by
Tagged with
0 votes
1 answer
37 views

Refer to other SLD in geoserver for GetLegendGraphic

I have a group layer in geoserver with all layers having one style each. However, for the legend I want to refer to an "external" SLD (basically a simplified "dummy legend"). The ...
user avatar
0 votes
1 answer
33 views

Changing font type and size in GetLegendGraphic

I've just exported a map but i've realised the font type of what's exactly is being displayed in the legend isn't the same. This is the GetLegendGraphic url referenced in the information tab. https://...
user avatar
  • 19
0 votes
0 answers
43 views

GetLegendGraphic with Filtered Range Rules

I have a style with several rules that include range filters. I'm having a hard time getting the appropriate legend graphic for a specific record. For example, a soil depth of 3 should return the ...
user avatar
  • 101
0 votes
2 answers
122 views

The GetLegendGraphic query does not return legends for the specified bbox value

I have a GetLegendGraphic request like: http://localhost:8080/geoserver/ows?service=WMS&request=GetLegendGraphic&width=19&height=19&layer=Workspace:Layer&rule=&bbox=8126200....
user avatar
3 votes
1 answer
232 views

Specify legend size in GetLegendGraphic

The WMS call GetLegendGraphic (in my case to Geoserver) returns a single image of icons and legends. How can I specify the width of the returned image? The WIDTH parameter is the width of the ...
user avatar
  • 5,572
1 vote
1 answer
105 views

Map not loading when using getLegend and showing error for getView()

I was able to run my application on using Legend earlier but now I want to update my Legend when scrolling on the map. So I tried to used this code GetLegendGraphic and getLegendUrl function filter by ...
user avatar
5 votes
1 answer
54 views

How to add a legend, banner to shp file exported in PDF

I need add a legend, banner and signature to my shp file which is exported in PDF. My code: HashMap<String, Object> params = new HashMap<>(); params.put(ShapefileDataStoreFactory....
user avatar
  • 85
1 vote
1 answer
1k views

GetLegendGraphic and getLegendUrl function filter by extent

I tried to get a legend image from my GeoServer Instance filtered by extent (render only symbologies that are currently displayed on screen). For this purpose I used the getLegendUrl function from ...
user avatar
  • 187
3 votes
1 answer
110 views

Lizmap legend layer

I'm trying to redirect GetLegendGraphics to another url. I changed LegendUrl in properties layer in QGIS : My Request=GetCapabilities shows the good link to my legend : <Style> <Name>...
user avatar
  • 180
1 vote
0 answers
337 views

How to modify the automatic GetLegendGraphic in QGIS when using QgsRasterLayer in the python interface to load data from a ncWMS server

tl;dr: How to add an extra parameter (using python) to the GetLegendGraphic request made by QGIS when a WMS layer is added using QgsRasterLayer? UK Reading University developed a map server called ...
user avatar
0 votes
1 answer
221 views

Legend Graphic for a multi polygon layer styled the same with unique (different) labels

When creating an SLD for a single polygon layer in QGIS and using that in Geoserver, by default the legend description is "single symbol". When you categorize the single polygon layer symbology and ...
user avatar
1 vote
0 answers
291 views

Adding WMS legend to see or remove layers in relation to the layer control? [closed]

This is the code, the problem is that always print the same png legend even if you select another layer. function addLeyenda(layer){ if( layer instanceof L.TileLayer.WMS ){ ...
user avatar
2 votes
0 answers
272 views

Creating a horizontal legend with labels in GeoServer

Im am trying to ask GeoServer for a horizontally orientated colorbar legend for my raster layer. I prepared an SLD style for the layer and asked for the legend with the GetLegendGraphic method, ...
user avatar
  • 123
4 votes
1 answer
391 views

Is it possible to get a dynamic legend in QGIS 3.6?

I need to send a GetPrint request for a map with a dynamic legend that only shows layers/items/symbols relevant for the current map frame. In QGIS 2.14 one can select "Filter Legend by Map Content" ...
user avatar
  • 51
3 votes
0 answers
126 views

Disabling appending of WMS parameters in geting legendurl image?

I used QGIS WMS to connect to our image server but it is displaying an error: Returned legend is flawed Our image sever is using our own image render protocol in legendurl to display image: ...
user avatar
1 vote
1 answer
552 views

How to set the order of layers in mapservers legend graphic?

Is it possible to set the order of the displayed elements (Layers) in the legend graphic recieved by WMS GetLegendGraphicREQUEST or will MAPSERVER always return in the order of layers defined in the ...
user avatar
  • 83
1 vote
1 answer
392 views

QGIS server legend does not show diagram colors

I have a QGIS version 2.18.18 map with pie-chart diagrams. The pie-chart maps display correctly in both QGIS-desktop and QGIS-server versions. The pie-chart classes are correctly displayed in the QGIS ...
user avatar
  • 1,151
1 vote
0 answers
51 views

ArcGIS Runtime .NET does not make a GetLegendGraphic request

I'm using ArcGIS runtime SDK .NET to populate maps with WMS Layers This is a bit strange. If I load a WMSLayer on the map without specifying any layer, I see how it starts to recover all the legends ...
user avatar
3 votes
2 answers
1k views

How to get legend image from a WMS using PyQgis

I want to load a WMS with PyQGIS. I know this is possible on version 2.18 If it is done with the graphical Interface by checking on the Use contextual WMS legend Now I manage to load a WMS with ...
user avatar
  • 113
1 vote
0 answers
325 views

Mapserver GetLegendGraphic via expression

I am trying around this for a while now. But can't find any answer. So I try it here. What do I have: Mapserver 7.0.6 What do I want: Obtaining a single legend graphic for a class without text and ...
user avatar
6 votes
1 answer
1k views

Dynamic label in SLD Style

I have a dynamic style in Geoserver, like below: <sld:ColorMap> <sld:ColorMapEntry color="#2c7bb6" quantity="${env('low',0)}" label="${env('low',0)}"/> <sld:...
user avatar
3 votes
0 answers
243 views

LegendGraphic and Label placement

I have to style some Rasters with SLD and get the legend from Geoserver to show it in my webapp. By default, labels are placed right to the Color Ramp. Is there any option, by using SLD or maybe any ...
user avatar
2 votes
2 answers
151 views

Is it possible to have a legend and other 'decorations' above the raster image in geoserver?

I would like to use geoserver to subsample a global raster geotiff into many smaller, regional images. These images all need to have their own legend and descriptive text. In all of the examples that ...
user avatar
4 votes
1 answer
4k views

QGIS WMS Layer - Returned legend image is flawed

I succeed in connecting to the following WMS in QGIS (2.14.15 LTR): https://secure.erlangen.de/arcgiser/services/Luftbild2016/MapServer/WMSServer?SERVICE=WMS&REQUEST=GetCapabilities ... with the ...
user avatar
0 votes
1 answer
509 views

Using YSLD functions and creating legends

My goal is to create legends, for WMS layers, which can be shown in a JavaScript/OpenLayers 3 client. Furthermore I found out, that GeoServer can generate legends via the SLD styles. This legends can ...
user avatar
  • 135
2 votes
1 answer
398 views

Geoserver raster legend in reverse order

If you get a legend from a geoserver raster the minimum value will be on top, the maximum at the bottom. <sld:ColorMapEntry color="#FFFFFF" quantity="0" opacity="0" label="0 mm"/> <sld:...
user avatar
  • 143
1 vote
1 answer
294 views

How to change getLegendGraphic option default?

I have several geoserver layers that have only one rule. By default, they do not get a text label in the legend. I know if you use LEGEND_OPTIONS=forceLabels:on in the getLegendGraphic call, it will ...
user avatar
1 vote
0 answers
27 views

Would like to have a WMS with colored polygon features but not a legend

This is in ArcMap 10.3. I am creating a WMS with a service definition file (I would like to keep the style how my WMS displays the data) - No problem. I have a feature dataset of polygons which I ...
user avatar
  • 440
2 votes
0 answers
318 views

GetLegendGraphic from layergroup in Geoserver 2.8.2

I am working with Geoserver 2.8.2 I am requesting a GetLegendGraphic to a layer group that holds three layers, each layer with one single SLD styling. I am getting a legend from Geoserver, but ...
user avatar
1 vote
1 answer
1k views

How to call Legend end points of multiple layers published from Geoserver?

I have map services published from ArcGIS server being called from Angular- Leaflet app and we are displaying the legend (controlled through map controls) from https://pxxxx.com/arcgis/rest/services/...
user avatar
  • 779
0 votes
0 answers
611 views

QGIS Server: how to get WMS GetLegendGraphic in HTML?

On MapServer you can get HTML content based legend graphic with WMS GetLegendGraphic. On QGIS we can have only PNGs. It would be nice to have the same behaviour on QGIS Server, with an HTML Template ...
user avatar
  • 241
1 vote
1 answer
534 views

How to display layer name to GetLegendGraphic request WMS service?

I have a Mapping and WMS Service that I have published via ArcServer 10.3.1. When communicating with the WMS service via a web browser, using a GetLegendGraphic Request. I am returned a graphic of my ...
user avatar
  • 901
1 vote
0 answers
292 views

How does getLegendGraphic, from GeoServer, handle attribute-based styles?

I have a layer with a color attribute and I write an SLD with a fill color like this: <sld:PolygonSymbolizer> <sld:Fill> <sld:CssParameter name="fill"> <...
user avatar
2 votes
1 answer
1k views

GetLegendGraphic request string is too long?

I am setting the SLD Body of a WMS layer on the client side. I set the style in JSON and I have some functions that convert the JSON to SLD (OpenLayers functions). It works fine for displaying the ...
user avatar
3 votes
1 answer
3k views

Geoserver GetLegendGraphic not working for single rule

<?xml version="1.0" encoding="ISO-8859-1"?> <StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www....
user avatar
  • 543
6 votes
1 answer
1k views

How can I add multiple rules in a GetLegendGraphic request in Geoserver?

I am using following GetLegendGraphcs request https://develop.blaa.nl/data/test/wms?LAYER=nccw:variabele_woz&request=GetLegendGraphic&format=image/png&styles=nccw_variabele_woz&rule=...
user avatar
  • 2,062
1 vote
0 answers
335 views

How to add Legend Panel to Dojo / OpenLayers?

I have OpenLayers app on Dojo framework. I've been serving WMS layers with GeoServer and wanted to use GetLegendGraphic to build legend for all layers. I've seen there are some ready widgets (like ...
user avatar
  • 2,649
5 votes
5 answers
10k views

Getting WMS LegendGraphic using GeoServer and GeoWebCache?

I am using GeoServer alongwith the default, build in GeoWebCache. I am using Extjs and GeoExt, as well. Everything is running well, except for the legend graphics request. My code for layers is as ...
user avatar
  • 2,794