QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
Public Member Functions | Static Public Member Functions | List of all members
QgsVectorTileMatrixSet Class Reference

Encapsulates properties of a vector tile matrix set, including tile origins and scaling information. More...

#include <qgsvectortilematrixset.h>

Inheritance diagram for QgsVectorTileMatrixSet:
Inheritance graph
[legend]

Public Member Functions

bool fromEsriJson (const QVariantMap &json)
 Initializes the tile structure settings from an ESRI REST VectorTileService json map. More...
 
- Public Member Functions inherited from QgsTileMatrixSet
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...
 
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 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...
 

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. More...
 

Detailed Description

Encapsulates properties of a vector tile matrix set, including tile origins and scaling information.

Since
QGIS 3.22.6

Definition at line 31 of file qgsvectortilematrixset.h.

Member Function Documentation

◆ fromEsriJson()

bool QgsVectorTileMatrixSet::fromEsriJson ( const QVariantMap &  json)

Initializes the tile structure settings from an ESRI REST VectorTileService json map.

Note
This same structure is utilized in ESRI vtpk archives in the root.json file.

Definition at line 29 of file qgsvectortilematrixset.cpp.

◆ fromWebMercator()

QgsVectorTileMatrixSet QgsVectorTileMatrixSet::fromWebMercator ( int  minimumZoom = 0,
int  maximumZoom = 14 
)
static

Returns a vector tile structure corresponding to the standard web mercator/GoogleCRS84Quad setup.

Definition at line 22 of file qgsvectortilematrixset.cpp.


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