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 committed Jun 18, 2019
1 parent ebb2983 commit c4b1431
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/server/services/wms/qgswmsrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,18 +751,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 @@ -1033,6 +1028,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 c4b1431

Please sign in to comment.