QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsWmsUtils Class Reference

Contains utility functions for OGC WMS layers. More...

#include <qgswmsutils.h>

Static Public Member Functions

static bool isWmsLayer (QgsMapLayer *layer)
 Returns whether a map layer is an OGC WMS layer or not.
static QString wmsVersion (QgsRasterLayer *layer)
 Returns the WMS version of a WMS layer as a string (e.g., "1.3.0").

Detailed Description

Contains utility functions for OGC WMS layers.

Since
QGIS 4.0

Definition at line 29 of file qgswmsutils.h.

Member Function Documentation

◆ isWmsLayer()

bool QgsWmsUtils::isWmsLayer ( QgsMapLayer * layer)
static

Returns whether a map layer is an OGC WMS layer or not.

Parameters
layerMap layer that will be checked.
Note
This method is strictly checking for OGC WMS sources. It will return false for WMTS or XYZ tile layers.

Definition at line 22 of file qgswmsutils.cpp.

◆ wmsVersion()

QString QgsWmsUtils::wmsVersion ( QgsRasterLayer * layer)
static

Returns the WMS version of a WMS layer as a string (e.g., "1.3.0").

Returns an empty string if the layer is not a valid WMS layer.

Parameters
layerWMS layer from which the version will be queried.

Definition at line 44 of file qgswmsutils.cpp.


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