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

Openlayers - export url GetLegendGraphic for wms layers #1015

Open
andreaordonselli opened this issue Nov 7, 2022 · 0 comments
Open

Openlayers - export url GetLegendGraphic for wms layers #1015

andreaordonselli opened this issue Nov 7, 2022 · 0 comments

Comments

@andreaordonselli
Copy link
Collaborator

Is it possible to integrate qgis2web to extract the url of the GetLegendGraphic in wms layer ?

In QGIS each wms layer has the url referring to the legend, called GetLegendGraphic
image

I would like the export of a wms layer to write this url after the title, as it happens for the standard layers
Example with url entered manually:

var lyr_ParchiNazionalidellaSardegnadatiindicativi = new ol.layer.Tile({
  source: new ol.source.TileWMS({
    url: "http://webgis.regione.sardegna.it/geoserver/ows",
    attributions: " ",
    params: {
      LAYERS: "dbu:PARCHINAZIONALI",
      TILED: "true",
      VERSION: "1.3.0"
    }
  }),
  title: "Parchi Nazionali della Sardegna (dati indicativi)<br />\
<img src='https://wms.cartografia.agenziaentrate.gov.it/inspire/wms/ows01.php?language=ita&version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=strade&format=image/png&STYLE=default&'>",					
  opacity: 1.0
});
wms_layers.push([lyr_ParchiNazionalidellaSardegnadatiindicativi, 1]);
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