File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ namespace QgsServerProjectUtils
157
157
/* *
158
158
* Returns the denominator of the default scale used in case of the scale is not given
159
159
* \param project the QGIS project
160
- * \return the denominator of the scale
160
+ * \returns the denominator of the scale
161
161
* \since QGIS 3.8
162
162
*/
163
163
SERVER_EXPORT double wmsDefaultMapUnitsPerMm ( const QgsProject &project );
Original file line number Diff line number Diff line change @@ -176,6 +176,11 @@ namespace QgsWms
176
176
settings.setMapScale ( mapSettings.scale () );
177
177
settings.setMapUnitsPerPixel ( mapSettings.mapUnitsPerPixel () );
178
178
}
179
+ else
180
+ {
181
+ double defaultMapUnitsPerPixel = QgsServerProjectUtils::wmsDefaultMapUnitsPerMm ( *mContext .project () ) / mContext .dotsPerMm ();
182
+ settings.setMapUnitsPerPixel ( defaultMapUnitsPerPixel );
183
+ }
179
184
180
185
// create image
181
186
const int width = mWmsParameters .widthAsInt ();
You can’t perform that action at this time.
0 commit comments