39 QgsRenderer renderer( serverIface, project, wmsParameters );
41 std::unique_ptr<QImage> result( renderer.
getMap() );
44 QString format = params.value( QStringLiteral(
"FORMAT" ), QStringLiteral(
"PNG" ) );
50 QStringLiteral(
"Failed to compute GetMap image" ) );
void writeGetMap(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetMap response in DXF format.
Exception class for WMS service exceptions.
void writeImage(QgsServerResponse &response, QImage &img, const QString &formatStr, int imageQuality)
Write image response.
QImage * getMap(HitTest *hitTest=nullptr)
Returns the map as an image (or a null pointer in case of error).
Provides an interface to retrieve and manipulate WMS parameters received from the client...
Reads and writes project states.
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.
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
QgsServerRequest::Parameters parameters() const
Returns a map of query parameters with keys converted to uppercase.
int getImageQuality() const
Returns the image quality to use for getMap request.
QMap< QString, QString > Parameters