24 if ( !layer || layer->
providerType() != QLatin1String(
"wms" ) )
29 if ( url.contains( QLatin1String(
"SERVICE=WMTS" ), Qt::CaseInsensitive ) || url.contains( QLatin1String(
"/WMTSCapabilities.xml" ), Qt::CaseInsensitive ) )
36 if ( parts.value( QStringLiteral(
"type" ) ).toString() == QLatin1String(
"xyz" ) )
49 return layer->
dataProvider()->
metadata().value( QStringLiteral(
"WmsVersion" ), QString() ).toString();
virtual QVariantMap metadata() const
Returns provider specific metadata.
Base class for all map layer types.
QString source() const
Returns the source for the layer.
QString providerType() const
Returns the provider type (provider key) for this layer.
QString publicSource(bool hidePassword=false) const
Gets a version of the internal layer definition that has sensitive bits removed (for example,...
QVariantMap decodeUri(const QString &providerKey, const QString &uri)
Breaks a provider data source URI into its component paths (e.g.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
Represents a raster layer.
QgsRasterDataProvider * dataProvider() override
Returns the source data provider.
static QString wmsVersion(QgsRasterLayer *layer)
Returns the WMS version of a WMS layer as a string (e.g., "1.3.0").
static bool isWmsLayer(QgsMapLayer *layer)
Returns whether a map layer is an OGC WMS layer or not.