QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
Signals | Public Member Functions | Static Public Member Functions | List of all members
QgsVectorTileLoader Class Reference

The loader class takes care of loading raw vector tile data from a tile source. More...

#include <qgsvectortileloader.h>

Inheritance diagram for QgsVectorTileLoader:
Inheritance graph
[legend]

Signals

void tileRequestFinished (const QgsVectorTileRawData &rawTile)
 Emitted when a tile request has finished. If a tile request has failed, the returned raw tile byte array is empty. More...
 

Public Member Functions

 QgsVectorTileLoader (const QString &uri, const QgsTileMatrix &tileMatrix, const QgsTileRange &range, const QPointF &viewCenter, const QString &authid, const QString &referer, QgsFeedback *feedback)
 Constructs tile loader for doing asynchronous requests and starts network requests. More...
 
 ~QgsVectorTileLoader ()
 
void downloadBlocking ()
 Blocks the caller until all asynchronous requests are finished (with a success or a failure) More...
 

Static Public Member Functions

static QList< QgsVectorTileRawDatablockingFetchTileRawData (const QString &sourceType, const QString &sourcePath, const QgsTileMatrix &tileMatrix, const QPointF &viewCenter, const QgsTileRange &range, const QString &authid, const QString &referer)
 Returns raw tile data for the specified range of tiles. Blocks the caller until all tiles are fetched. More...
 
static QByteArray loadFromMBTiles (const QgsTileXYZ &id, QgsMbTiles &mbTileReader)
 Returns raw tile data for a single tile loaded from MBTiles file. More...
 
static QByteArray loadFromNetwork (const QgsTileXYZ &id, const QgsTileMatrix &tileMatrix, const QString &requestUrl, const QString &authid, const QString &referer)
 Returns raw tile data for a single tile, doing a HTTP request. Block the caller until tile data are downloaded. More...
 

Detailed Description

The loader class takes care of loading raw vector tile data from a tile source.

Since
QGIS 3.14

Definition at line 58 of file qgsvectortileloader.h.

Constructor & Destructor Documentation

◆ QgsVectorTileLoader()

QgsVectorTileLoader::QgsVectorTileLoader ( const QString &  uri,
const QgsTileMatrix tileMatrix,
const QgsTileRange range,
const QPointF &  viewCenter,
const QString &  authid,
const QString &  referer,
QgsFeedback feedback 
)

Constructs tile loader for doing asynchronous requests and starts network requests.

Definition at line 31 of file qgsvectortileloader.cpp.

◆ ~QgsVectorTileLoader()

QgsVectorTileLoader::~QgsVectorTileLoader ( )

Definition at line 56 of file qgsvectortileloader.cpp.

Member Function Documentation

◆ blockingFetchTileRawData()

QList< QgsVectorTileRawData > QgsVectorTileLoader::blockingFetchTileRawData ( const QString &  sourceType,
const QString &  sourcePath,
const QgsTileMatrix tileMatrix,
const QPointF &  viewCenter,
const QgsTileRange range,
const QString &  authid,
const QString &  referer 
)
static

Returns raw tile data for the specified range of tiles. Blocks the caller until all tiles are fetched.

Definition at line 161 of file qgsvectortileloader.cpp.

◆ downloadBlocking()

void QgsVectorTileLoader::downloadBlocking ( )

Blocks the caller until all asynchronous requests are finished (with a success or a failure)

Definition at line 68 of file qgsvectortileloader.cpp.

◆ loadFromMBTiles()

QByteArray QgsVectorTileLoader::loadFromMBTiles ( const QgsTileXYZ id,
QgsMbTiles mbTileReader 
)
static

Returns raw tile data for a single tile loaded from MBTiles file.

Definition at line 211 of file qgsvectortileloader.cpp.

◆ loadFromNetwork()

QByteArray QgsVectorTileLoader::loadFromNetwork ( const QgsTileXYZ id,
const QgsTileMatrix tileMatrix,
const QString &  requestUrl,
const QString &  authid,
const QString &  referer 
)
static

Returns raw tile data for a single tile, doing a HTTP request. Block the caller until tile data are downloaded.

Definition at line 187 of file qgsvectortileloader.cpp.

◆ tileRequestFinished

void QgsVectorTileLoader::tileRequestFinished ( const QgsVectorTileRawData rawTile)
signal

Emitted when a tile request has finished. If a tile request has failed, the returned raw tile byte array is empty.


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