Skip to content

Commit afa20ec

Browse files
committedMar 31, 2016
[FEATURE:] Redlining in QGIS server (GetMap and GetPrint). Funded by canton of Solothurn
1 parent befa962 commit afa20ec

File tree

6 files changed

+326
-30
lines changed

6 files changed

+326
-30
lines changed
 

‎src/server/qgsowsserver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
#include <QHash>
2727

28+
class QgsMapLayer;
29+
2830
class QgsOWSServer
2931
{
3032
public:

‎src/server/qgssldconfigparser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,11 +717,11 @@ bool QgsSLDConfigParser::WMSInspireActivated() const
717717
return false;
718718
}
719719

720-
QgsComposition* QgsSLDConfigParser::createPrintComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, const QMap< QString, QString >& parameterMap ) const
720+
QgsComposition* QgsSLDConfigParser::createPrintComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, const QMap< QString, QString >& parameterMap, QStringList& highlightLayers ) const
721721
{
722722
if ( mFallbackParser )
723723
{
724-
return mFallbackParser->createPrintComposition( composerTemplate, mapRenderer, parameterMap );
724+
return mFallbackParser->createPrintComposition( composerTemplate, mapRenderer, parameterMap, highlightLayers );
725725
}
726726
return nullptr;
727727
}

‎src/server/qgssldconfigparser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class QgsSLDConfigParser : public QgsWMSConfigParser
112112
//printing
113113

114114
/** Creates a print composition, usually for a GetPrint request. Replaces map and label parameters*/
115-
QgsComposition* createPrintComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, const QMap< QString, QString >& parameterMap ) const;
115+
QgsComposition* createPrintComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, const QMap< QString, QString >& parameterMap, QStringList& highlightLayers ) const;
116116

117117
/** Creates a composition from the project file (probably delegated to the fallback parser)*/
118118
QgsComposition* initComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, QList< QgsComposerMap*>& mapList, QList< QgsComposerLegend* >& legendList, QList< QgsComposerLabel* >& labelList, QList<const QgsComposerHtml *>& htmlFrameList ) const override;

‎src/server/qgswmsconfigparser.cpp

Lines changed: 296 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include "qgswmsconfigparser.h"
1919
#include "qgsmaplayer.h"
20+
#include "qgsmaplayerregistry.h"
2021
#include "qgsmapserviceexception.h"
2122

2223
#include "qgscomposerlabel.h"
@@ -30,6 +31,10 @@
3031
#include "qgslayertreegroup.h"
3132
#include "qgslayertreelayer.h"
3233

34+
#include "qgsrendererv2.h"
35+
#include "qgsvectordataprovider.h"
36+
#include "qgsvectorlayer.h"
37+
3338
QgsWMSConfigParser::QgsWMSConfigParser()
3439
{
3540

@@ -40,7 +45,7 @@ QgsWMSConfigParser::~QgsWMSConfigParser()
4045

4146
}
4247

43-
QgsComposition* QgsWMSConfigParser::createPrintComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, const QMap< QString, QString >& parameterMap ) const
48+
QgsComposition* QgsWMSConfigParser::createPrintComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, const QMap< QString, QString >& parameterMap, QStringList& highlightLayers ) const
4449
{
4550
QList<QgsComposerMap*> composerMaps;
4651
QList<QgsComposerLegend*> composerLegends;
@@ -133,56 +138,74 @@ QgsComposition* QgsWMSConfigParser::createPrintComposition( const QString& compo
133138
}
134139

135140
//layers / styles
136-
QString layers = parameterMap.value( mapId + ":LAYERS" );
137-
QString styles = parameterMap.value( mapId + ":STYLES" );
138-
if ( !layers.isEmpty() )
141+
QStringList layerSet;
142+
if ( currentMap->keepLayerSet() )
143+
{
144+
layerSet = currentMap->layerSet();
145+
}
146+
else
139147
{
140-
QStringList layerSet;
141-
QStringList wmsLayerList = layers.split( ",", QString::SkipEmptyParts );
148+
QString layers = parameterMap.value( mapId + ":LAYERS" );
149+
QString styles = parameterMap.value( mapId + ":STYLES" );
150+
151+
152+
if ( layers.isEmpty() )
153+
{
154+
layers = parameterMap.value( "LAYERS" );
155+
styles = parameterMap.value( "STYLES" );
156+
}
157+
158+
QStringList wmsLayerList = layers.split( "," );
142159
QStringList wmsStyleList;
143160

144161
if ( !styles.isEmpty() )
145162
{
146-
wmsStyleList = styles.split( ",", QString::SkipEmptyParts );
163+
wmsStyleList = styles.split( "," );
147164
}
148165

149166
for ( int i = 0; i < wmsLayerList.size(); ++i )
150167
{
151-
QString wmsLayer = wmsLayerList.at( i );
152168
QString styleName;
153169
if ( wmsStyleList.size() > i )
154170
{
155171
styleName = wmsStyleList.at( i );
156172
}
157173

158-
bool allowCaching = true;
159-
if ( wmsLayerList.count( wmsLayer ) > 1 )
160-
{
161-
allowCaching = false;
162-
}
163-
164-
QList<QgsMapLayer*> layerList = mapLayerFromStyle( wmsLayer, styleName, allowCaching );
165-
int listIndex;
166-
for ( listIndex = 0; listIndex < layerList.size(); listIndex++ )
174+
foreach ( QgsMapLayer *layer, mapLayerFromStyle( wmsLayerList.at( i ), styleName ) )
167175
{
168-
QgsMapLayer* layer = layerList.at( listIndex );
169176
if ( layer )
170177
{
171178
layerSet.push_back( layer->id() );
172179
}
173180
}
174181
}
182+
}
183+
184+
//save layer list prior to adding highlight layers
185+
QStringList bkLayerSet = layerSet;
186+
187+
//add highlight layers
188+
highlightLayers.append( addHighlightLayers( parameterMap, layerSet, mapId + ":" ) );
175189

176-
currentMap->setLayerSet( layerSet );
177-
currentMap->setKeepLayerSet( true );
190+
currentMap->setLayerSet( layerSet );
191+
currentMap->setKeepLayerSet( true );
192+
193+
//remove highlight layers from the composer legends
194+
QList< QgsComposerLegend* >::iterator legendIt = composerLegends.begin();
195+
for ( ; legendIt != composerLegends.end(); ++legendIt )
196+
{
197+
if (( *legendIt )->model()->autoUpdate() )
198+
{
199+
( *legendIt )->model()->setLayerSet( bkLayerSet );
200+
}
178201
}
179202

180203
//grid space x / y
181204
currentMap->grid()->setIntervalX( parameterMap.value( mapId + ":GRID_INTERVAL_X" ).toDouble() );
182205
currentMap->grid()->setIntervalY( parameterMap.value( mapId + ":GRID_INTERVAL_Y" ).toDouble() );
183206
}
184-
//update legend
185-
// if it has an auto-update model
207+
//update legend
208+
// if it has an auto-update model
186209
Q_FOREACH ( QgsComposerLegend* currentLegend, composerLegends )
187210
{
188211
if ( !currentLegend )
@@ -243,7 +266,7 @@ QgsComposition* QgsWMSConfigParser::createPrintComposition( const QString& compo
243266
}
244267
}
245268

246-
//replace label text
269+
//replace label text
247270
Q_FOREACH ( QgsComposerLabel *currentLabel, composerLabels )
248271
{
249272
QString title = parameterMap.value( currentLabel->id().toUpper() );
@@ -263,7 +286,7 @@ QgsComposition* QgsWMSConfigParser::createPrintComposition( const QString& compo
263286
currentLabel->setText( title );
264287
}
265288

266-
//replace html url
289+
//replace html url
267290
Q_FOREACH ( const QgsComposerHtml *currentHtml, composerHtmls )
268291
{
269292
QgsComposerHtml * html = const_cast<QgsComposerHtml *>( currentHtml );
@@ -294,3 +317,252 @@ QgsComposition* QgsWMSConfigParser::createPrintComposition( const QString& compo
294317

295318
return c;
296319
}
320+
321+
QStringList QgsWMSConfigParser::addHighlightLayers( const QMap<QString, QString>& parameterMap, QStringList& layerSet, const QString& parameterPrefix )
322+
{
323+
QStringList highlightLayers, geomSplit, symbolSplit, labelSplit, labelFontSplit, labelSizeSplit,
324+
labelWeightSplit, labelColorSplit, labelBufferColorSplit, labelBufferSizeSplit;
325+
highlightParameters( parameterMap, parameterPrefix, geomSplit, symbolSplit, labelSplit, labelFontSplit, labelSizeSplit, labelWeightSplit,
326+
labelColorSplit, labelBufferColorSplit, labelBufferSizeSplit );
327+
328+
if ( geomSplit.isEmpty() || symbolSplit.isEmpty() )
329+
{
330+
return highlightLayers;
331+
}
332+
333+
QString crsString = parameterMap.contains( "CRS" ) ? parameterMap.value( "CRS" ) : parameterMap.value( "SRS" );
334+
335+
int nHighlights = qMin( geomSplit.size(), symbolSplit.size() );
336+
for ( int i = 0; i < nHighlights; ++i )
337+
{
338+
//create geometry
339+
QScopedPointer<QgsGeometry> geom( QgsGeometry::fromWkt( geomSplit.at( i ) ) );
340+
if ( !geom.data() )
341+
{
342+
continue;
343+
}
344+
345+
//create renderer from sld
346+
QString sld = symbolSplit[i];
347+
QDomDocument sldDoc;
348+
if ( !sldDoc.setContent( symbolSplit[i], true ) )
349+
{
350+
continue;
351+
}
352+
353+
QString errorMsg;
354+
QScopedPointer<QgsFeatureRendererV2> renderer( QgsFeatureRendererV2::loadSld( sldDoc.documentElement(), geom.data()->type(), errorMsg ) );
355+
if ( !renderer.data() )
356+
{
357+
continue;
358+
}
359+
360+
//add label settings
361+
QString labelString;
362+
if ( i < labelSplit.size() )
363+
{
364+
labelString = labelSplit.at( i );
365+
}
366+
367+
QScopedPointer<QgsVectorLayer> layer( createHighlightLayer( i, crsString, geom.take(), labelString, labelSizeSplit, labelColorSplit, labelWeightSplit, labelFontSplit,
368+
labelBufferSizeSplit, labelBufferColorSplit ) );
369+
if ( !layer.data() )
370+
{
371+
continue;
372+
}
373+
374+
layer->setRendererV2( renderer.take() );
375+
layerSet.prepend( layer.data()->id() );
376+
highlightLayers.append( layer.data()->id() );
377+
QgsMapLayerRegistry::instance()->addMapLayers( QList<QgsMapLayer *>() << layer.take() );
378+
}
379+
return highlightLayers;
380+
}
381+
382+
QgsVectorLayer* QgsWMSConfigParser::createHighlightLayer( int i, const QString& crsString, QgsGeometry* geom, const QString& labelString, const QStringList& labelSizeSplit, const QStringList& labelColorSplit,
383+
const QStringList& labelWeightSplit, const QStringList& labelFontSplit, const QStringList& labelBufferSizeSplit,
384+
const QStringList& labelBufferColorSplit )
385+
{
386+
if ( !geom )
387+
{
388+
return 0;
389+
}
390+
391+
QGis::GeometryType geomType = geom->type();
392+
QString typeName = QString( QGis::featureType( geom->wkbType() ) ).replace( "WKB", "" );
393+
QString url = typeName + "?crs=" + crsString;
394+
if ( !labelString.isEmpty() )
395+
{
396+
url += "&field=label:string";
397+
if ( geomType == QGis::Polygon )
398+
{
399+
url += "&field=x:double&field=y:double&field=hali:string&field=vali:string";
400+
}
401+
}
402+
403+
QgsVectorLayer* layer = new QgsVectorLayer( url, "highlight_" + QString::number( i ), "memory" );
404+
if ( !layer->isValid() )
405+
{
406+
delete layer;
407+
return 0;
408+
}
409+
410+
QgsFeature fet( layer->pendingFields() );
411+
if ( !labelString.isEmpty() )
412+
{
413+
fet.setAttribute( 0, labelString );
414+
if ( geomType == QGis::Polygon )
415+
{
416+
QgsGeometry* point = geom->pointOnSurface();
417+
if ( point )
418+
{
419+
QgsPoint pt = point->asPoint();
420+
fet.setAttribute( 1, pt.x() );
421+
fet.setAttribute( 2, pt.y() );
422+
fet.setAttribute( 3, "Center" );
423+
fet.setAttribute( 4, "Half" );
424+
}
425+
}
426+
427+
layer->setCustomProperty( "labeling/fieldName", "label" );
428+
layer->setCustomProperty( "labeling/enabled", "true" );
429+
layer->setCustomProperty( "labeling", "pal" );
430+
//give highest priority to highlight layers and make sure the labels are always drawn
431+
layer->setCustomProperty( "labeling/priority", "10" );
432+
layer->setCustomProperty( "labeling/displayAll", "true" );
433+
434+
//fontsize?
435+
if ( i < labelSizeSplit.size() )
436+
{
437+
layer->setCustomProperty( "labeling/fontSize", labelSizeSplit.at( i ) );
438+
}
439+
//font color
440+
if ( i < labelColorSplit.size() )
441+
{
442+
QColor c( labelColorSplit.at( i ) );
443+
layer->setCustomProperty( "labeling/textColorR", c.red() );
444+
layer->setCustomProperty( "labeling/textColorG", c.green() );
445+
layer->setCustomProperty( "labeling/textColorB", c.blue() );
446+
}
447+
//font weight
448+
if ( i < labelWeightSplit.size() )
449+
{
450+
layer->setCustomProperty( "labeling/fontWeight", labelWeightSplit.at( i ) );
451+
}
452+
453+
//font family list
454+
if ( i < labelFontSplit.size() )
455+
{
456+
layer->setCustomProperty( "labeling/fontFamily", labelFontSplit.at( i ) );
457+
}
458+
459+
//buffer
460+
if ( i < labelBufferSizeSplit.size() )
461+
{
462+
layer->setCustomProperty( "labeling/bufferSize", labelBufferSizeSplit.at( i ) );
463+
}
464+
465+
//buffer color
466+
if ( i < labelBufferColorSplit.size() )
467+
{
468+
QColor c( labelBufferColorSplit.at( i ) );
469+
layer->setCustomProperty( "labeling/bufferColorR", c.red() );
470+
layer->setCustomProperty( "labeling/bufferColorG", c.green() );
471+
layer->setCustomProperty( "labeling/bufferColorB", c.blue() );
472+
}
473+
474+
//placement
475+
int placement = 0;
476+
switch ( geomType )
477+
{
478+
case QGis::Point:
479+
placement = 0;
480+
layer->setCustomProperty( "labeling/dist", 2 );
481+
layer->setCustomProperty( "labeling/placementFlags", 0 );
482+
break;
483+
case QGis::Polygon:
484+
layer->setCustomProperty( "labeling/dataDefinedProperty9", 1 );
485+
layer->setCustomProperty( "labeling/dataDefinedProperty10", 2 );
486+
layer->setCustomProperty( "labeling/dataDefinedProperty11", 3 );
487+
layer->setCustomProperty( "labeling/dataDefinedProperty12", 4 );
488+
break;
489+
default:
490+
placement = 2; //parallel placement for line
491+
layer->setCustomProperty( "labeling/dist", 2 );
492+
layer->setCustomProperty( "labeling/placementFlags", 10 );
493+
}
494+
layer->setCustomProperty( "labeling/placement", placement );
495+
}
496+
497+
fet.setGeometry( geom );
498+
layer->dataProvider()->addFeatures( QgsFeatureList() << fet );
499+
return layer;
500+
}
501+
502+
void QgsWMSConfigParser::highlightParameters( const QMap<QString, QString>& parameterMap, const QString& parameterPrefix, QStringList& geom, QStringList& symbol,
503+
QStringList& label, QStringList& labelFont, QStringList& labelSize, QStringList& labelWeight, QStringList& labelColor,
504+
QStringList& labelBufferColor, QStringList& labelBufferSize )
505+
{
506+
QString geomParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_GEOM" );
507+
QString symbolParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_SYMBOL" );
508+
if ( geomParam.isEmpty() || symbolParam.isEmpty() )
509+
{
510+
return;
511+
}
512+
QString labelParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_LABELSTRING" );
513+
QString labelFontParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_LABELFONT" );
514+
QString labelSizeParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_LABELSIZE" );
515+
QString labelWeightParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_LABELWEIGHT" );
516+
QString labelColorParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_LABELCOLOR" );
517+
QString labelBufferColorParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_LABELBUFFERCOLOR" );
518+
QString labelBufferSizeParam = parameterMap.value( parameterPrefix + "HIGHLIGHT_LABELBUFFERSIZE" );
519+
520+
geom = geomParam.split( ";" );
521+
symbol = symbolParam.split( ";" );
522+
523+
label.clear();
524+
labelFont.clear();
525+
labelSize.clear();
526+
labelWeight.clear();
527+
labelColor.clear();
528+
labelBufferColor.clear();
529+
labelBufferSize.clear();
530+
531+
if ( !labelParam.isEmpty() )
532+
{
533+
label = labelParam.split( ";" );
534+
}
535+
if ( !labelFontParam.isEmpty() )
536+
{
537+
labelFont = labelFontParam.split( ";" );
538+
}
539+
if ( !labelSizeParam.isEmpty() )
540+
{
541+
labelSize = labelSizeParam.split( ";" );
542+
}
543+
if ( !labelWeightParam.isEmpty() )
544+
{
545+
labelWeight = labelWeightParam.split( ";" );
546+
}
547+
if ( !labelColorParam.isEmpty() )
548+
{
549+
labelColor = labelColorParam.split( ";" );
550+
}
551+
if ( !labelBufferColorParam.isEmpty() )
552+
{
553+
labelBufferColor = labelBufferColorParam.split( ";" );
554+
}
555+
if ( !labelBufferSizeParam.isEmpty() )
556+
{
557+
labelBufferSize = labelBufferSizeParam.split( ";" );
558+
}
559+
}
560+
561+
void QgsWMSConfigParser::removeHighlightLayers( const QStringList& layerIds )
562+
{
563+
QStringList::const_iterator idIt = layerIds.constBegin();
564+
for ( ; idIt != layerIds.constEnd(); ++idIt )
565+
{
566+
QgsMapLayerRegistry::instance()->removeMapLayers( QStringList() << *idIt );
567+
}
568+
}

‎src/server/qgswmsconfigparser.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class SERVER_EXPORT QgsWMSConfigParser
113113
//printing
114114

115115
/** Creates a print composition, usually for a GetPrint request. Replaces map and label parameters*/
116-
QgsComposition* createPrintComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, const QMap< QString, QString >& parameterMap ) const;
116+
QgsComposition* createPrintComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, const QMap< QString, QString >& parameterMap, QStringList& highlightLayers ) const;
117117

118118
/** Creates a composition from the project file (probably delegated to the fallback parser)*/
119119
virtual QgsComposition* initComposition( const QString& composerTemplate, QgsMapRenderer* mapRenderer, QList< QgsComposerMap*>& mapList, QList< QgsComposerLegend* >& legendList, QList< QgsComposerLabel* >& labelList, QList<const QgsComposerHtml *>& htmlFrameList ) const = 0;
@@ -132,10 +132,25 @@ class SERVER_EXPORT QgsWMSConfigParser
132132

133133
virtual bool useLayerIDs() const = 0;
134134

135+
/** Adds highlight layers to the layer registry and to the layer set. Returns the ids of the newly created layers (for later removal)*/
136+
static QStringList addHighlightLayers( const QMap<QString, QString>& parameterMap, QStringList& layerSet, const QString& parameterPrefix = QString() );
137+
static void removeHighlightLayers( const QStringList& layerIds );
138+
135139
#if 0
136140
/** List of GML datasets passed outside SLD (e.g. in a SOAP request). Key of the map is the layer name*/
137141
QMap<QString, QDomDocument*> mExternalGMLDatasets;
138142
#endif //0
143+
144+
private:
145+
146+
//helper methods for 'addHighlightLayers'
147+
static void highlightParameters( const QMap<QString, QString>& parameterMap, const QString &parameterPrefix, QStringList& geom, QStringList& symbol, QStringList& label,
148+
QStringList& labelFont, QStringList& labelSize, QStringList& labelWeight, QStringList& labelColor,
149+
QStringList& labelBufferColor, QStringList &labelBufferSize );
150+
151+
static QgsVectorLayer* createHighlightLayer( int i, const QString& crsString, QgsGeometry* geom, const QString& labelString, const QStringList& labelSizeSplit, const QStringList& labelColorSplit,
152+
const QStringList& labelWeightSplit, const QStringList& labelFontSplit, const QStringList& labelBufferSizeSplit,
153+
const QStringList& labelBufferColorSplit );
139154
};
140155

141156
#endif // QGSWMSCONFIGPARSER_H

‎src/server/qgswmsserver.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,12 +1282,13 @@ QByteArray* QgsWMSServer::getPrint( const QString& formatString )
12821282

12831283
applyOpacities( layersList, bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies );
12841284

1285-
1286-
QgsComposition* c = mConfigParser->createPrintComposition( mParameters[ "TEMPLATE" ], mMapRenderer, QMap<QString, QString>( mParameters ) );
1285+
QStringList highlightLayers;
1286+
QgsComposition* c = mConfigParser->createPrintComposition( mParameters[ "TEMPLATE" ], mMapRenderer, QMap<QString, QString>( mParameters ), highlightLayers );
12871287
if ( !c )
12881288
{
12891289
restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies );
12901290
clearFeatureSelections( selectedLayerIdList );
1291+
QgsWMSConfigParser::removeHighlightLayers( highlightLayers );
12911292
return nullptr;
12921293
}
12931294

@@ -1353,6 +1354,7 @@ QByteArray* QgsWMSServer::getPrint( const QString& formatString )
13531354

13541355
restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies );
13551356
clearFeatureSelections( selectedLayerIdList );
1357+
QgsWMSConfigParser::removeHighlightLayers( highlightLayers );
13561358

13571359
delete c;
13581360
return ba;
@@ -1388,6 +1390,10 @@ QImage* QgsWMSServer::getMap( HitTest* hitTest )
13881390
QPainter thePainter( theImage );
13891391
thePainter.setRenderHint( QPainter::Antialiasing ); //make it look nicer
13901392

1393+
QStringList layerSet = mMapRenderer->layerSet();
1394+
QStringList highlightLayers = QgsWMSConfigParser::addHighlightLayers( mParameters, layerSet );
1395+
mMapRenderer->setLayerSet( layerSet );
1396+
13911397
#ifdef HAVE_SERVER_PYTHON_PLUGINS
13921398
Q_FOREACH ( QgsMapLayer *layer, QgsMapLayerRegistry::instance()->mapLayers() )
13931399
{
@@ -1432,6 +1438,7 @@ QImage* QgsWMSServer::getMap( HitTest* hitTest )
14321438

14331439
restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies );
14341440
clearFeatureSelections( selectedLayerIdList );
1441+
QgsWMSConfigParser::removeHighlightLayers( highlightLayers );
14351442

14361443
// QgsMessageLog::logMessage( "clearing filters" );
14371444
if ( !hitTest )

0 commit comments

Comments
 (0)
Failed to load comments.