Skip to content
Permalink
Browse files

Merge pull request #38255 from mhugent/3_10_wms_external_layers

Port fix for external wms with several layers to 3.10 branch
  • Loading branch information
mhugent committed Sep 2, 2020
2 parents 41e0ec1 + 1f2f1f5 commit 994f1a2da070ab147d338dc81e2b6d2e3f81452c
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/server/services/wms/qgswmsparameters.cpp
@@ -1854,7 +1854,17 @@ namespace QgsWms
QMap<QString, QString>::const_iterator paramIt = paramMap.constBegin();
for ( ; paramIt != paramMap.constEnd(); ++paramIt )
{
wmsUri.setParam( paramIt.key().toLower(), paramIt.value() );
QString paramName = paramIt.key().toLower();
if ( paramName == QLatin1String( "layers" ) || paramName == QLatin1String( "styles" ) )
{
const QStringList values = paramIt.value().split( ',' );
for ( const QString &value : values )
wmsUri.setParam( paramName, value );
}
else
{
wmsUri.setParam( paramName, paramIt.value() );
}
}
return wmsUri.encodedUri();
}

0 comments on commit 994f1a2

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