1

I would to know if it is possible to set a WMS url in which I would use project variables as parameters?

Let's say I have: QGIS project variable : my_variable = some_query WMS url : https://wxs.myserver.com/wms?LAYERS=OI.OrthoimageCoverage& EXCEPTIONS=text/xml&FORMAT=image/png&SERVICE=WMS&VERSION=1.3.0& REQUEST=GetMap&STYLES=&CRS=EPSG:4326&WIDTH=256&HEIGHT=256

I want to replace the LAYERS=OI.OrthoimageCoverage with my predefine project variable as follow:

https://wxs.myserver.com/wms?LAYERS=@my_variable& EXCEPTIONS=text/xml&FORMAT=image/png&SERVICE=WMS&VERSION=1.3.0& REQUEST=GetMap&STYLES=&CRS=EPSG:4326&WIDTH=256&HEIGHT=256

Is there a way to do this?

  • Do u mean : "is it possible to build a url string using project variables" ? – snaileater May 11 at 14:17
  • A string not really. My idea was to have a WMS layer in a project that can be updated following a property stored as project variable. If the variable in the project is modified, then the URL for the WMS layer will be too. But I don't know if it is possible or not. – M-Rick May 11 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.