QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Types | Public Member Functions | List of all members
QgsWms::QgsRenderer Class Reference

Map renderer for WMS requests. More...

#include <qgswmsrenderer.h>

Public Types

typedef QHash< QgsVectorLayer *, SymbolSetHitTest
 
typedef QSet< QString > SymbolSet
 

Public Member Functions

 QgsRenderer (QgsServerInterface *serverIface, const QgsProject *project, QgsWmsParameters &parameters)
 Constructor. More...
 
 ~QgsRenderer ()
 
QgsDxfExport getDxf (const QMap< QString, QString > &options)
 Returns the map as DXF data. More...
 
QByteArray getFeatureInfo (const QString &version="1.3.0")
 Creates an xml document that describes the result of the getFeatureInfo request. More...
 
int getImageQuality () const
 Returns the image quality to use for getMap request. More...
 
QImage * getLegendGraphics ()
 Returns the map legend as an image (or a null pointer in case of error). More...
 
QImage * getMap (HitTest *hitTest=nullptr)
 Returns the map as an image (or a null pointer in case of error). More...
 
QImage * getMap (QgsMapSettings &mapSettings, HitTest *hitTest=nullptr)
 Identical to getMap( HitTest* hitTest ) and updates the map settings actually used. More...
 
QByteArray getPrint (const QString &formatString)
 Returns printed page as binary. More...
 
int getWMSPrecision () const
 Returns the precision to use for GetFeatureInfo request. More...
 

Detailed Description

Map renderer for WMS requests.

Since
QGIS 3.0

Definition at line 71 of file qgswmsrenderer.h.

Member Typedef Documentation

Definition at line 90 of file qgswmsrenderer.h.

typedef QSet<QString> QgsWms::QgsRenderer::SymbolSet

Definition at line 89 of file qgswmsrenderer.h.

Constructor & Destructor Documentation

QgsWms::QgsRenderer::QgsRenderer ( QgsServerInterface serverIface,
const QgsProject project,
QgsWmsParameters parameters 
)

Constructor.

Does NOT take ownership of QgsConfigParser and QgsCapabilitiesCache

Definition at line 129 of file qgswmsrenderer.cpp.

QgsWms::QgsRenderer::~QgsRenderer ( )

Definition at line 145 of file qgswmsrenderer.cpp.

Member Function Documentation

QgsDxfExport QgsWms::QgsRenderer::getDxf ( const QMap< QString, QString > &  options)

Returns the map as DXF data.

Parameters
optionsextracted from the FORMAT_OPTIONS parameter
Returns
the map as DXF data
Since
QGIS 3.0

Definition at line 774 of file qgswmsrenderer.cpp.

QByteArray QgsWms::QgsRenderer::getFeatureInfo ( const QString &  version = "1.3.0")

Creates an xml document that describes the result of the getFeatureInfo request.

May throw an exception

Definition at line 906 of file qgswmsrenderer.cpp.

int QgsWms::QgsRenderer::getImageQuality ( ) const

Returns the image quality to use for getMap request.

Definition at line 2471 of file qgswmsrenderer.cpp.

QImage * QgsWms::QgsRenderer::getLegendGraphics ( )

Returns the map legend as an image (or a null pointer in case of error).

The caller takes ownership of the image object

Definition at line 151 of file qgswmsrenderer.cpp.

QImage * QgsWms::QgsRenderer::getMap ( HitTest hitTest = nullptr)

Returns the map as an image (or a null pointer in case of error).

The caller takes ownership of the image object). If an instance to existing hit test structure is passed, instead of rendering it will fill the structure with symbols that would be used for rendering

Definition at line 679 of file qgswmsrenderer.cpp.

QImage * QgsWms::QgsRenderer::getMap ( QgsMapSettings mapSettings,
HitTest hitTest = nullptr 
)

Identical to getMap( HitTest* hitTest ) and updates the map settings actually used.

Since
QGIS 3.0

Definition at line 685 of file qgswmsrenderer.cpp.

QByteArray QgsWms::QgsRenderer::getPrint ( const QString &  formatString)

Returns printed page as binary.

Parameters
formatStringout: format of the print output (e.g. pdf, svg, png, ...)
Returns
printed page as binary or 0 in case of error

Definition at line 319 of file qgswmsrenderer.cpp.

int QgsWms::QgsRenderer::getWMSPrecision ( ) const

Returns the precision to use for GetFeatureInfo request.

Definition at line 2485 of file qgswmsrenderer.cpp.


The documentation for this class was generated from the following files: