Skip to content

Commit

Permalink
Replace Name entry by Abstract in GetCapabilities for root layer
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Nov 16, 2017
1 parent 8dd70c1 commit f9c80f3
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/server/services/wms/qgswmsgetcapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down

0 comments on commit f9c80f3

Please sign in to comment.