Skip to content

Commit

Permalink
Set extent buffer in configureMapSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
Éric Lemoine authored and mbernasocchi committed Jul 25, 2019
1 parent 3855989 commit b310dd6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -750,18 +750,13 @@ namespace QgsWms
QgsMapSettings mapSettings;
configureLayers( layers, &mapSettings );

const QSize mapSize = mContext.mapSize();

// create the output image and the painter
std::unique_ptr<QPainter> painter;
std::unique_ptr<QImage> image( createImage( mapSize ) );
std::unique_ptr<QImage> image( createImage( mContext.mapSize() ) );

// configure map settings (background, DPI, ...)
configureMapSettings( image.get(), mapSettings );

// set the extent buffer in the map settings
mapSettings.setExtentBuffer( mContext.mapTileBuffer( mapSize.width() ) );

// add layers to map settings
mapSettings.setLayers( layers );

Expand Down Expand Up @@ -1032,6 +1027,9 @@ namespace QgsWms

mapSettings.setExtent( mapExtent );

// set the extent buffer
mapSettings.setExtentBuffer( mContext.mapTileBuffer( paintDevice->width() ) );

/* Define the background color
* Transparent or colored
*/
Expand Down

0 comments on commit b310dd6

Please sign in to comment.