QGIS API Documentation  3.6.0-Noosa (5873452)
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, const 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 60 of file qgswmsrenderer.h.

Member Typedef Documentation

◆ HitTest

Definition at line 79 of file qgswmsrenderer.h.

◆ SymbolSet

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

Definition at line 78 of file qgswmsrenderer.h.

Constructor & Destructor Documentation

◆ QgsRenderer()

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

Constructor.

Does NOT take ownership of QgsConfigParser and QgsCapabilitiesCache

Definition at line 117 of file qgswmsrenderer.cpp.

◆ ~QgsRenderer()

QgsWms::QgsRenderer::~QgsRenderer ( )

Definition at line 133 of file qgswmsrenderer.cpp.

Member Function Documentation

◆ getDxf()

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 877 of file qgswmsrenderer.cpp.

◆ getFeatureInfo()

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 1009 of file qgswmsrenderer.cpp.

◆ getImageQuality()

int QgsWms::QgsRenderer::getImageQuality ( ) const

Returns the image quality to use for getMap request.

Definition at line 2563 of file qgswmsrenderer.cpp.

◆ getLegendGraphics()

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 139 of file qgswmsrenderer.cpp.

◆ getMap() [1/2]

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 782 of file qgswmsrenderer.cpp.

◆ getMap() [2/2]

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 788 of file qgswmsrenderer.cpp.

◆ getPrint()

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 278 of file qgswmsrenderer.cpp.

◆ getWMSPrecision()

int QgsWms::QgsRenderer::getWMSPrecision ( ) const

Returns the precision to use for GetFeatureInfo request.

Definition at line 2577 of file qgswmsrenderer.cpp.


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