Skip to content
Permalink
Browse files

Merge pull request #9115 from m-kuhn/wmts-getcapabilities-compat

Append ? to WMTS GetCapabilities
  • Loading branch information
m-kuhn committed Feb 6, 2019
2 parents d92f9e7 + 76ac0f1 commit 31ab3bb5d14bc36f6f3fcc5ba336d71b609ef5e7
@@ -272,8 +272,12 @@ namespace QgsWmts
QDomElement httpElement = doc.createElement( QStringLiteral( "ows:HTTP" )/*ows:HTTP*/ );
dcpElement.appendChild( httpElement );

//Prepare url
QString hrefString = serviceUrl( request, project );
// Get service URL
const QUrl href = serviceUrl( request, project );

//href needs to be a prefix
QString hrefString = href.toString();
hrefString.append( href.hasQuery() ? '&' : '?' );

//ows:Get
QDomElement getElement = doc.createElement( QStringLiteral( "ows:Get" )/*ows:Get*/ );
@@ -20,21 +20,21 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://www.qgis.org/"/>
<ows:Get xlink:href="https://www.qgis.org/?"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetTile">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://www.qgis.org/"/>
<ows:Get xlink:href="https://www.qgis.org/?"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetFeatureInfo">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://www.qgis.org/"/>
<ows:Get xlink:href="https://www.qgis.org/?"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
@@ -20,21 +20,21 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://www.qgis.org/"/>
<ows:Get xlink:href="https://www.qgis.org/?"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetTile">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://www.qgis.org/"/>
<ows:Get xlink:href="https://www.qgis.org/?"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetFeatureInfo">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://www.qgis.org/"/>
<ows:Get xlink:href="https://www.qgis.org/?"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>

0 comments on commit 31ab3bb

Please sign in to comment.
You can’t perform that action at this time.