39 contentType = QStringLiteral(
"image/png" );
42 contentType = QStringLiteral(
"image/jpeg" );
45 contentType = QStringLiteral(
"image/svg+xml" );
48 contentType = QStringLiteral(
"application/pdf" );
70 response.
setHeader( QStringLiteral(
"Content-Type" ), contentType );
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
virtual void write(const QString &data)
Write string This is a convenient method that will write directly to the underlying I/O device.
virtual void setHeader(const QString &key, const QString &value)=0
Set Header entry Add Header entry to the response Note that it is usually an error to set Header afte...
virtual QgsFeedback * feedback() const
Returns the socket feedback if any.
Exception thrown in case of malformed request.
Map renderer for WMS requests.
QByteArray getPrint()
Returns printed page as binary.
Provides an interface to retrieve and manipulate WMS parameters received from the client.
Format format() const
Returns format.
Format
Output format for the response.
Rendering context for the WMS renderer.
void setParameters(const QgsWmsParameters ¶meters)
Sets WMS parameters.
void setFlag(Flag flag, bool on=true)
Sets or unsets a rendering flag according to the on value.
void setSocketFeedback(QgsFeedback *feedback)
Sets the response feedback.
@ AddAllLayers
For GetPrint: add layers from LAYER(S) parameter.
Class defining request interface passed to WMS service.
const QgsWmsParameters & wmsParameters() const
Returns the parameters interpreted for the WMS service.
Median cut implementation.
void writeGetPrint(QgsServerInterface *serverIface, const QgsProject *project, const QgsWmsRequest &request, QgsServerResponse &response)
Output GetPrint response.