QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
16 #ifndef QGSVECTORTILELAYER_H
17 #define QGSVECTORTILELAYER_H
19 #include "qgis_core.h"
89 explicit QgsVectorTileLayer(
const QString &path = QString(),
const QString &baseName = QString() );
102 virtual bool readSymbology(
const QDomNode &node, QString &errorMessage,
106 StyleCategories categories = AllStyleCategories )
const override;
156 bool loadDataSource();
164 int mSourceMinZoom = -1;
166 int mSourceMaxZoom = -1;
169 std::unique_ptr<QgsVectorTileRenderer> mRenderer;
171 std::unique_ptr<QgsVectorTileLabeling> mLabeling;
173 bool mTileBorderRendering =
false;
177 #endif // QGSVECTORTILELAYER_H
virtual bool writeXml(QDomNode &layer_node, QDomDocument &document, const QgsReadWriteContext &context) const
Called by writeLayerXML(), used by children to write state specific to them to project files.
QString sourceType() const
Returns type of the data source.
virtual QgsMapLayer * clone() const =0
Returns a new instance equivalent to this one except for the id which is still unique.
bool isTileBorderRenderingEnabled() const
Returns whether to render also borders of tiles (useful for debugging)
QString sourcePath() const
Returns URL/path of the data source (syntax different to each data source type)
virtual QString encodedSource(const QString &source, const QgsReadWriteContext &context) const
Called by writeLayerXML(), used by derived classes to encode provider's specific data source to proje...
void setTileBorderRenderingEnabled(bool enabled)
Sets whether to render also borders of tiles (useful for debugging)
virtual QString decodedSource(const QString &source, const QString &dataProvider, const QgsReadWriteContext &context) const
Called by readLayerXML(), used by derived classes to decode provider's specific data source from proj...
virtual void setTransformContext(const QgsCoordinateTransformContext &transformContext)=0
Sets the coordinate transform context to transformContext.
virtual bool readSymbology(const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories)=0
Read the symbology for the current layer from the DOM node supplied.
int sourceMaxZoom() const
Returns maximum zoom level at which source has any valid tiles (negative = unconstrained)
virtual bool writeSymbology(QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) const =0
Write the style for the layer into the docment provided.
virtual bool readXml(const QDomNode &layer_node, QgsReadWriteContext &context)
Called by readLayerXML(), used by children to read state specific to them from project files.
int sourceMinZoom() const
Returns minimum zoom level at which source has any valid tiles (negative = unconstrained)
virtual QgsMapLayerRenderer * createMapRenderer(QgsRenderContext &rendererContext)=0
Returns new instance of QgsMapLayerRenderer that will be used for rendering of given context.