|
QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
Defines a set of tile matrices for multiple zoom levels. More...
#include <qgstiles.h>

Public Member Functions | |
| virtual | ~QgsTileMatrixSet ()=default |
| void | addGoogleCrs84QuadTiles (int minimumZoom=0, int maximumZoom=14) |
| Adds tile matrices corresponding to the standard web mercator/GoogleCRS84Quad setup. More... | |
| void | addMatrix (const QgsTileMatrix &matrix) |
| Adds a matrix to the set. More... | |
| double | calculateTileScaleForMap (double actualMapScale, const QgsCoordinateReferenceSystem &mapCrs, const QgsRectangle &mapExtent, const QSize mapSize, const double mapDpi) const |
| Calculates the correct scale to use for the tiles when rendered using the specified map properties. More... | |
| QgsCoordinateReferenceSystem | crs () const |
| Returns the coordinate reference system associated with the tiles. More... | |
| void | dropMatricesOutsideZoomRange (int minimumZoom, int maximumZoom) |
| Deletes any existing matrices which fall outside the zoom range specified by minimumZoom to maximumZoom, inclusive. More... | |
| bool | isEmpty () const |
Returns true if the matrix set is empty. More... | |
| int | maximumZoom () const |
| Returns the maximum zoom level for tiles present in the set. More... | |
| int | minimumZoom () const |
| Returns the minimum zoom level for tiles present in the set. More... | |
| virtual bool | readXml (const QDomElement &element, QgsReadWriteContext &context) |
| Reads the set from an XML element. More... | |
| QgsTileMatrix | rootMatrix () const |
| Returns the root tile matrix (usually corresponding to zoom level 0). More... | |
| double | scaleForRenderContext (const QgsRenderContext &context) const |
| Calculates the correct scale to use for the tiles when rendered using the specified render context. More... | |
| Qgis::ScaleToTileZoomLevelMethod | scaleToTileZoomMethod () const |
| Returns the scale to tile zoom method. More... | |
| double | scaleToZoom (double scale) const |
| Calculates a fractional zoom level given a map scale denominator. More... | |
| int | scaleToZoomLevel (double scale) const |
| Finds the best fitting (integer) zoom level given a map scale denominator. More... | |
| void | setRootMatrix (const QgsTileMatrix &matrix) |
| Sets the root tile matrix (usually corresponding to zoom level 0). More... | |
| void | setScaleToTileZoomMethod (Qgis::ScaleToTileZoomLevelMethod method) |
| Sets the scale to tile zoom method. More... | |
| QgsTileMatrix | tileMatrix (int zoom) const |
| Returns the tile matrix corresponding to the specified zoom. More... | |
| virtual QDomElement | writeXml (QDomDocument &document, const QgsReadWriteContext &context) const |
| Writes the set to an XML element. More... | |
Defines a set of tile matrices for multiple zoom levels.
Definition at line 223 of file qgstiles.h.
|
virtualdefault |
| void QgsTileMatrixSet::addGoogleCrs84QuadTiles | ( | int | minimumZoom = 0, |
| int | maximumZoom = 14 |
||
| ) |
Adds tile matrices corresponding to the standard web mercator/GoogleCRS84Quad setup.
Definition at line 137 of file qgstiles.cpp.
| void QgsTileMatrixSet::addMatrix | ( | const QgsTileMatrix & | matrix | ) |
Adds a matrix to the set.
Any existing matrix with the same QgsTileMatrix::zoomLevel() will be replaced.
Definition at line 165 of file qgstiles.cpp.
| double QgsTileMatrixSet::calculateTileScaleForMap | ( | double | actualMapScale, |
| const QgsCoordinateReferenceSystem & | mapCrs, | ||
| const QgsRectangle & | mapExtent, | ||
| const QSize | mapSize, | ||
| const double | mapDpi | ||
| ) | const |
Calculates the correct scale to use for the tiles when rendered using the specified map properties.
Definition at line 282 of file qgstiles.cpp.
| QgsCoordinateReferenceSystem QgsTileMatrixSet::crs | ( | ) | const |
Returns the coordinate reference system associated with the tiles.
In the case of a tile set containing mixed CRS at different zoom levels this method will return the crs of the minimum zoom tile matrix.
Definition at line 207 of file qgstiles.cpp.
| void QgsTileMatrixSet::dropMatricesOutsideZoomRange | ( | int | minimumZoom, |
| int | maximumZoom | ||
| ) |
Deletes any existing matrices which fall outside the zoom range specified by minimumZoom to maximumZoom, inclusive.
Definition at line 192 of file qgstiles.cpp.
| bool QgsTileMatrixSet::isEmpty | ( | ) | const |
Returns true if the matrix set is empty.
Definition at line 132 of file qgstiles.cpp.
| int QgsTileMatrixSet::maximumZoom | ( | ) | const |
Returns the maximum zoom level for tiles present in the set.
Definition at line 181 of file qgstiles.cpp.
| int QgsTileMatrixSet::minimumZoom | ( | ) | const |
Returns the minimum zoom level for tiles present in the set.
Definition at line 170 of file qgstiles.cpp.
|
virtual |
| QgsTileMatrix QgsTileMatrixSet::rootMatrix | ( | ) | const |
Returns the root tile matrix (usually corresponding to zoom level 0).
Definition at line 155 of file qgstiles.cpp.
| double QgsTileMatrixSet::scaleForRenderContext | ( | const QgsRenderContext & | context | ) | const |
Calculates the correct scale to use for the tiles when rendered using the specified render context.
Definition at line 273 of file qgstiles.cpp.
|
inline |
Returns the scale to tile zoom method.
Definition at line 344 of file qgstiles.h.
| double QgsTileMatrixSet::scaleToZoom | ( | double | scale | ) | const |
Calculates a fractional zoom level given a map scale denominator.
The zoom level will be linearly interpolated between zoom levels present in the set.
Definition at line 215 of file qgstiles.cpp.
| int QgsTileMatrixSet::scaleToZoomLevel | ( | double | scale | ) | const |
Finds the best fitting (integer) zoom level given a map scale denominator.
Values are constrained to the zoom levels between minimumZoom() and maximumZoom().
Definition at line 257 of file qgstiles.cpp.
| void QgsTileMatrixSet::setRootMatrix | ( | const QgsTileMatrix & | matrix | ) |
Sets the root tile matrix (usually corresponding to zoom level 0).
Definition at line 160 of file qgstiles.cpp.
|
inline |
Sets the scale to tile zoom method.
Definition at line 351 of file qgstiles.h.
| QgsTileMatrix QgsTileMatrixSet::tileMatrix | ( | int | zoom | ) | const |
Returns the tile matrix corresponding to the specified zoom.
Definition at line 150 of file qgstiles.cpp.
|
virtual |
Writes the set to an XML element.
Definition at line 364 of file qgstiles.cpp.