53    std::unique_ptr<QImage> result( renderer.
getMap() );
 
   62      const QString format = request.
parameters().value( QStringLiteral( 
"FORMAT" ), QStringLiteral( 
"PNG" ) );
 
   67      throw QgsException( QStringLiteral( 
"Failed to compute GetMap image" ) );
 
 
Defines a QGIS exception class.
 
bool isCanceled() const
Tells whether the operation has been canceled already.
 
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
 
Defines interfaces exposed by QGIS Server and made available to plugins.
 
virtual QString version() const
Returns VERSION parameter as a string or an empty string if not defined.
 
QgsServerParameters serverParameters() const
Returns parameters.
 
QgsServerRequest::Parameters parameters() const
Returns a map of query parameters with keys converted to uppercase.
 
Defines the response interface passed to QgsService.
 
virtual QgsFeedback * feedback() const
Returns the socket feedback if any.
 
Map renderer for WMS requests.
 
std::unique_ptr< QImage > getMap()
Returns the map as an image (or nullptr in case of error).
 
Exception class for WMS service exceptions.
 
@ OGC_OperationNotSupported
 
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.
 
int imageQuality() const
Returns the image quality to use for rendering according to the current configuration.
 
Defines request interfaces passed to WMS service.
 
const QgsWmsParameters & wmsParameters() const
Returns the parameters interpreted for the WMS service.
 
Median cut implementation.
 
void writeImage(QgsServerResponse &response, QImage &img, const QString &formatStr, int imageQuality)
Write image response.
 
void writeGetMap(QgsServerInterface *serverIface, const QgsProject *project, const QgsWmsRequest &request, QgsServerResponse &response)
Output GetMap response in DXF format.