Skip to content
Permalink
Browse files

[BUGFIX][QGIS Server] WFS Service Capability OnlineResource

WFS Service Capability OnlineResource is not the same as in WMS.
  • Loading branch information
rldhont committed Feb 9, 2016
1 parent 2d4de98 commit 45fa67dd69d05ab8fb3c9624954ca6ccca0c795c
Showing with 13 additions and 6 deletions.
  1. +13 −6 src/server/qgsserverprojectparser.cpp
@@ -460,16 +460,23 @@ void QgsServerProjectParser::serviceCapabilities( QDomElement& parentElement, QD

//OnlineResource element is mandatory according to the WMS specification
QDomElement wmsOnlineResourceElem = propertiesElement.firstChildElement( "WMSOnlineResource" );
QDomElement onlineResourceElem = doc.createElement( "OnlineResource" );
onlineResourceElem.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" );
onlineResourceElem.setAttribute( "xlink:type", "simple" );
if ( !wmsOnlineResourceElem.isNull() )
{
onlineResourceElem.setAttribute( "xlink:href", wmsOnlineResourceElem.text() );
QDomElement onlineResourceElem = doc.createElement( "OnlineResource" );
if ( service.compare( "WFS", Qt::CaseInsensitive ) == 0 )
{
QDomText onlineResourceText = doc.createTextNode( wmsOnlineResourceElem.text() );
onlineResourceElem.appendChild( onlineResourceText );
}
else
{
onlineResourceElem.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" );
onlineResourceElem.setAttribute( "xlink:type", "simple" );
onlineResourceElem.setAttribute( "xlink:href", wmsOnlineResourceElem.text() );
}
serviceElem.appendChild( onlineResourceElem );
}

serviceElem.appendChild( onlineResourceElem );

if ( service.compare( "WMS", Qt::CaseInsensitive ) == 0 ) //no contact information in WFS 1.0 and WCS 1.0
{
//Contact information

0 comments on commit 45fa67d

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