Skip to content
Permalink
Browse files
Call loadLabelSettings in initializeRender method and enable in sldpa…
…rser
  • Loading branch information
mhugent committed Jun 11, 2014
1 parent 1bab141 commit dedc66274a8640f502667bd155250ca47c43cee8
Showing with 15 additions and 9 deletions.
  1. +9 −4 src/mapserver/qgssldconfigparser.cpp
  2. +6 −5 src/mapserver/qgswmsserver.cpp
@@ -528,15 +528,20 @@ bool QgsSLDConfigParser::featureInfoFormatSIA2045() const
return false;
}

void QgsSLDConfigParser::drawOverlays( QPainter *, int , int, int ) const
void QgsSLDConfigParser::drawOverlays( QPainter* p, int dpi, int width, int height ) const
{
//todo: fixme
if ( mFallbackParser )
{
mFallbackParser->drawOverlays( p, dpi, width, height );
}
}

void QgsSLDConfigParser::loadLabelSettings( QgsLabelingEngineInterface * lbl ) const
{
Q_UNUSED ( lbl );
//needs to be here?
if ( mFallbackParser )
{
mFallbackParser->loadLabelSettings( lbl );
}
}

QString QgsSLDConfigParser::serviceUrl() const
@@ -999,11 +999,6 @@ QImage* QgsWMSServer::getMap()

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

if ( mConfigParser )
{
mConfigParser->loadLabelSettings( mMapRenderer->labelingEngine() );
}

mMapRenderer->render( &thePainter );
if ( mConfigParser )
{
@@ -1390,6 +1385,12 @@ QImage* QgsWMSServer::initializeRendering( QStringList& layersList, QStringList&
#endif
mMapRenderer->setLayerSet( layerIdList );

//load label settings
if ( mConfigParser )
{
mConfigParser->loadLabelSettings( mMapRenderer->labelingEngine() );
}

return theImage;
}

0 comments on commit dedc662

Please sign in to comment.