QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Encapsulates properties of a vector tile matrix set, including tile origins and scaling information. More...
#include <qgsvectortilematrixset.h>
Public Member Functions | |
bool | fromEsriJson (const QVariantMap &json, const QVariantMap &rootTileMap=QVariantMap()) |
Initializes the tile structure settings from an ESRI REST VectorTileService json map. | |
Public Member Functions inherited from QgsTileMatrixSet | |
QgsTileMatrixSet () | |
virtual | ~QgsTileMatrixSet ()=default |
void | addGoogleCrs84QuadTiles (int minimumZoom=0, int maximumZoom=14) |
Adds tile matrices corresponding to the standard web mercator/GoogleCRS84Quad setup. | |
void | addMatrix (const QgsTileMatrix &matrix) |
Adds a matrix to the set. | |
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. | |
QgsCoordinateReferenceSystem | crs () const |
Returns the coordinate reference system associated with the tiles. | |
void | dropMatricesOutsideZoomRange (int minimumZoom, int maximumZoom) |
Deletes any existing matrices which fall outside the zoom range specified by minimumZoom to maximumZoom, inclusive. | |
bool | isEmpty () const |
Returns true if the matrix set is empty. | |
int | maximumZoom () const |
Returns the maximum zoom level for tiles present in the set. | |
int | minimumZoom () const |
Returns the minimum zoom level for tiles present in the set. | |
virtual bool | readXml (const QDomElement &element, QgsReadWriteContext &context) |
Reads the set from an XML element. | |
QgsTileMatrix | rootMatrix () const |
Returns the root tile matrix (usually corresponding to zoom level 0). | |
double | scaleForRenderContext (const QgsRenderContext &context) const |
Calculates the correct scale to use for the tiles when rendered using the specified render context. | |
Qgis::ScaleToTileZoomLevelMethod | scaleToTileZoomMethod () const |
Returns the scale to tile zoom method. | |
double | scaleToZoom (double scale) const |
Calculates a fractional zoom level given a map scale denominator. | |
int | scaleToZoomLevel (double scale, bool clamp=true) const |
Finds the best fitting (integer) zoom level given a map scale denominator. | |
void | setRootMatrix (const QgsTileMatrix &matrix) |
Sets the root tile matrix (usually corresponding to zoom level 0). | |
void | setScaleToTileZoomMethod (Qgis::ScaleToTileZoomLevelMethod method) |
Sets the scale to tile zoom method. | |
Qgis::TileAvailability | tileAvailability (QgsTileXYZ id) const |
Returns the availability of the given tile in this matrix. | |
QgsTileMatrix | tileMatrix (int zoom) const |
Returns the tile matrix corresponding to the specified zoom. | |
QVector< QgsTileXYZ > | tilesInRange (QgsTileRange range, int zoomLevel) const |
Returns a list of tiles in the given tile range. | |
virtual QDomElement | writeXml (QDomDocument &document, const QgsReadWriteContext &context) const |
Writes the set to an XML element. | |
Static Public Member Functions | |
static QgsVectorTileMatrixSet | fromWebMercator (int minimumZoom=0, int maximumZoom=14) |
Returns a vector tile structure corresponding to the standard web mercator/GoogleCRS84Quad setup. | |
Additional Inherited Members | |
Protected Attributes inherited from QgsTileMatrixSet | |
QgsTileMatrix | mRootMatrix |
Qgis::ScaleToTileZoomLevelMethod | mScaleToTileZoomMethod = Qgis::ScaleToTileZoomLevelMethod::MapBox |
std::function< Qgis::TileAvailability(QgsTileXYZ id) > | mTileAvailabilityFunction |
QMap< int, QgsTileMatrix > | mTileMatrices |
std::function< Qgis::TileAvailability(QgsTileXYZ id, QgsTileXYZ &replacement) > | mTileReplacementFunction |
Encapsulates properties of a vector tile matrix set, including tile origins and scaling information.
Definition at line 30 of file qgsvectortilematrixset.h.
bool QgsVectorTileMatrixSet::fromEsriJson | ( | const QVariantMap & | json, |
const QVariantMap & | rootTileMap = QVariantMap() |
||
) |
Initializes the tile structure settings from an ESRI REST VectorTileService json map.
Optionally, a rootTileMap can be specified for indexed vector tile datasets (since QGIS 3.32)
Definition at line 29 of file qgsvectortilematrixset.cpp.
|
static |
Returns a vector tile structure corresponding to the standard web mercator/GoogleCRS84Quad setup.
Definition at line 22 of file qgsvectortilematrixset.cpp.