Feature request #6354
WMS layer using VIEWPARAMETERS
|Category:||Web Services clients/WMS|
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||15626|
We have found it to be impossible to add WMS layer using VIEWPARAMETERS in Qgis Desktop.
There is no fields to add such parameters in Add Layer(s) from a Server Window .
We tried to make workaround with Python script, but failed also. There is only seven parameters in
qgis.utils.iface.addRasterLayer(url, 'some layer name', 'wms', layers, styles, format, crs).
We tried to add our '&VIEWPARAMS=kiht:TTT_025' to url, but it was passed to GetCapabilities only.
GetMap request was made without it.
We think that adding VIEWPARAMS to the WMS options will be very useful.
This possibility is in Geoserver, Mapserver and Qgis Server, but we can't use this in Desktop.
#3 Updated by Emmanuel Blondel over 4 years ago
We have exactly the same need here. But without targeting this specific parameter (viewparams) which AFAIK is not part of the WMS standard, wouldn't be possible to let user add additional parameter (strictly standard or not, depending on the WMS server used), as field, and a field for its values.
This applies to the above example:
parameter name: VIEWPARAMS
parameter value: kiht:TTT_025
But this would also let users apply standard params like CQL_FILTER.
In case you could provide some pointers, we would be keen on contributing to this improvement.
Thanks in advance for your feedback