Try Richard's great 'QGIS Network Logger' plugin, to see all WMS requests. I've recorded several options here to grab the GetMap url: https://github.com/mapserver/mapserver/wiki/Get-the-Raw-WMS-Request-Generated-by-QGIS

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/



On 2020-03-31 11:37 a.m., Jakob Miksch wrote:
Dear list,

I want to extract the "GetMap" URL from WMS layers. For most of the WMS layers I can extract it from "layer.source()". However this does not work for WMS layers where "GetMap" and "GetCapabilities" is different. Like for this layer: https://www.geoportal.rlp.de/mapbender/php/wms.php?inspire=1&layer_id=69694&withChilds=1&INSPIRE=1&;

The only place where I can find the "GetMap" URL is inside the "layer.htmlMetadata()" document. From there the URL can be extracted using REGEX. But every localization of QGIS (e.g. German, French ...) have different terms for the surrounding "GetMap" HTML element. This makes this approach quite tricky.

Is there any more elegant solution how to retrieve the "GetMap" URL from WMS layers?

Thanks in advance and best wishes,
Jakob


_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to