Skip to content

Commit 1636e6a

Browse files
pblottiererldhont
authored andcommitted
Add BBOX and CRS before layers definition
1 parent 9e5f382 commit 1636e6a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/server/services/wms/qgswmsgetcapabilities.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,13 @@ namespace QgsWms
12061206
QDomElement abstractElement = layerElement.firstChildElement( QStringLiteral( "Abstract" ) );
12071207
QDomElement CRSPrecedingElement = abstractElement.isNull() ? titleElement : abstractElement; //last element before the CRS elements
12081208

1209+
if ( CRSPrecedingElement.isNull() )
1210+
{
1211+
// keyword list element is never empty
1212+
const QDomElement keyElement = layerElement.firstChildElement( QStringLiteral( "KeywordList" ) );
1213+
CRSPrecedingElement = keyElement;
1214+
}
1215+
12091216
//In case the number of advertised CRS is constrained
12101217
if ( !constrainedCrsList.isEmpty() )
12111218
{

0 commit comments

Comments
 (0)