Skip to content

Commit e39e3b5

Browse files
committed
Add BBOX and CRS before layers definition
1 parent 201f108 commit e39e3b5

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
@@ -1205,6 +1205,13 @@ namespace QgsWms
12051205
QDomElement abstractElement = layerElement.firstChildElement( QStringLiteral( "Abstract" ) );
12061206
QDomElement CRSPrecedingElement = abstractElement.isNull() ? titleElement : abstractElement; //last element before the CRS elements
12071207

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

0 commit comments

Comments
 (0)