32 QgsWmsParameters parameters( QUrlQuery( request.
url() ) );
35 if ( ( parameters.widthAsInt() <= 0
36 || parameters.heightAsInt() <= 0 )
37 && ! parameters.infoFormatIsImage() )
41 if ( ! parameters.filterGeom().isEmpty() )
44 const int defaultWidth = 800;
45 size.setWidth( defaultWidth );
46 size.setHeight( defaultWidth * bbox.
height() / bbox.
width() );
54 QgsWmsRenderContext context( project, serverIface );
59 context.setParameters( parameters );
61 const QString infoFormat = request.
parameters().value( QStringLiteral(
"INFO_FORMAT" ), QStringLiteral(
"text/plain" ) );
62 response.
setHeader( QStringLiteral(
"Content-Type" ), infoFormat + QStringLiteral(
"; charset=utf-8" ) );
64 QgsRenderer renderer( context );
65 response.
write( renderer.getFeatureInfo( version ) );