Skip to content
Permalink
Browse files

Replace Name entry by Abstract in GetCapabilities for root layer

  • Loading branch information
pblottiere committed Nov 8, 2017
1 parent 8dd70c1 commit f9c80f321cc8e4ecf75e4bff0bd2cd680fc66352
Showing with 6 additions and 15 deletions.
  1. +6 −15 src/server/services/wms/qgswmsgetcapabilities.cpp
@@ -770,27 +770,18 @@ namespace QgsWms

QDomElement layerParentElem = doc.createElement( QStringLiteral( "Layer" ) );

// Root Layer name
QDomElement layerParentNameElem = doc.createElement( QStringLiteral( "Name" ) );
QString rootName = QgsServerProjectUtils::wmsRootName( *project );
if ( rootName.isEmpty() )
{
QDomText layerParentNameText = doc.createTextNode( project->title() );
layerParentNameElem.appendChild( layerParentNameText );
}
else
{
QDomText layerParentNameText = doc.createTextNode( rootName );
layerParentNameElem.appendChild( layerParentNameText );
}
layerParentElem.appendChild( layerParentNameElem );

// Root Layer title
QDomElement layerParentTitleElem = doc.createElement( QStringLiteral( "Title" ) );
QDomText layerParentTitleText = doc.createTextNode( project->title() );
layerParentTitleElem.appendChild( layerParentTitleText );
layerParentElem.appendChild( layerParentTitleElem );

// Root Layer abstract
QDomElement layerParentAbstElem = doc.createElement( QStringLiteral( "Abstract" ) );
QDomText layerParentAbstText = doc.createTextNode( project->title() );
layerParentAbstElem.appendChild( layerParentAbstText );
layerParentElem.appendChild( layerParentAbstElem );

// Root Layer tree name
if ( projectSettings )
{

0 comments on commit f9c80f3

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