52 std::unique_ptr<QImage> result( renderer.
getMap() );
56 const QString format = request.
parameters().value( QStringLiteral(
"FORMAT" ), QStringLiteral(
"PNG" ) );
61 throw QgsException( QStringLiteral(
"Failed to compute GetMap image" ) );
void writeGetMap(QgsServerInterface *serverIface, const QgsProject *project, const QString &, const QgsServerRequest &request, QgsServerResponse &response)
Output GetMap response in DXF format.
int imageQuality() const
Returns the image quality to use for rendering according to the current configuration.
void setFlag(Flag flag, bool on=true)
Sets or unsets a rendering flag according to the on value.
void setParameters(const QgsWmsParameters ¶meters)
Sets WMS parameters.
QImage * getMap()
Returns the map as an image (or nullptr in case of error).
void writeImage(QgsServerResponse &response, QImage &img, const QString &formatStr, int imageQuality)
Write image response.
QgsServerRequest::Parameters parameters() const
Returns a map of query parameters with keys converted to uppercase.
Provides an interface to retrieve and manipulate WMS parameters received from the client...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts, annotations, canvases, etc.
Median cut implementation.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins...
Map renderer for WMS requests.
Rendering context for the WMS renderer.
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
Defines a QGIS exception class.