Skip To Content ArcGIS for Developers Sign In Dashboard

WmsService Class


Represents an OGC Web Map Service (WMS). More...

Header: #include <WmsService>
Since: Esri::ArcGISRuntime 100.2
Inherits: Object, Loadable, and RemoteResource

Public Functions

WmsService(const QUrl &url, QObject *parent = nullptr)
WmsService(const QUrl &url, Credential *credential, QObject *parent = nullptr)
QMap<QString, QString> customParameters() const
WmsServiceInfo serviceInfo() const
void setCustomParameters(const QMap<QString, QString> &customParameters)
WmsVersion version() const

Reimplemented Public Functions

virtual void cancelLoad()
virtual Credential *credential() const
virtual void load()
virtual Error loadError() const
virtual LoadStatus loadStatus() const
virtual RequestConfiguration requestConfiguration() const
virtual void retryLoad()
virtual void setRequestConfiguration(const RequestConfiguration &requestConfiguration)
virtual QUrl url() const


void doneLoading(Esri::ArcGISRuntime::Error loadError)
void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

Represents an OGC Web Map Service (WMS).

The OGC WMS standard describes an implementation for requesting geo-registered map images from one or more distributed geospatial databases.

The WmsService is constructed using the URL of the service and once the load task completes (see Loadable) allows the user to browse for predefined content via the serviceInfo.

A WMS service may also host several layers, each of which can be described by a WmsLayerInfo.

See also Loadable, WmsLayerInfo, and WmsLayer.

Member Function Documentation

WmsService::WmsService(const QUrl &url, QObject *parent = nullptr)

Constructor that accepts a URL (url) and an optional parent.

WmsService::WmsService(const QUrl &url, Credential *credential, QObject *parent = nullptr)

Constructor that accepts a URL, a Credential, and an optional parent object.

  • url - The URL of the WMS service.
  • credential - The credential.
  • parent - The parent object for this WmsService (optional).



[virtual] void WmsService::cancelLoad()

Reimplemented from Loadable::cancelLoad().

See Loadable.

[virtual] Credential *WmsService::credential() const

Reimplemented from RemoteResource::credential().

Returns the security credential used to access this WmsService.

Only applicable if the service is secured.

QMap<QString, QString> WmsService::customParameters() const

Returns the custom parameters that are applied to WMS requests related to this service.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also setCustomParameters().

[signal] void WmsService::doneLoading(Esri::ArcGISRuntime::Error loadError)

Signal emitted when this object is done loading.

  • loadError - Details about any error that may have occurred.

Note: If there is a load error it will also be emitted on the errorOccurred signal.

See also Loadable and Object.

[virtual] void WmsService::load()

Reimplemented from Loadable::load().

See Loadable.

[virtual] Error WmsService::loadError() const

Reimplemented from Loadable::loadError().

See Loadable.

[virtual] LoadStatus WmsService::loadStatus() const

Reimplemented from Loadable::loadStatus().

See Loadable.

[signal] void WmsService::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

Signal emitted when the load status changes for this object.

See also Loadable.

[virtual] RequestConfiguration WmsService::requestConfiguration() const

Reimplemented from RemoteResource::requestConfiguration().

Returns the RequestConfiguration in use by this task.

See also setRequestConfiguration().

[virtual] void WmsService::retryLoad()

Reimplemented from Loadable::retryLoad().

See Loadable.

WmsServiceInfo WmsService::serviceInfo() const

Returns the service info for this service.

A WmsServiceInfo provides the information for browsing and accessing the service contents.

void WmsService::setCustomParameters(const QMap<QString, QString> &customParameters)

Sets the custom parameters that are applied to WMS requests related to this service to customParameters.

customParameters is a map of strings where the key is the parameter's name and the value is the parameter's value.

When making a WMS request, only parameters required by the service are included by default. Setting custom parameters will allow you to specify any additional parameters, such as API keys or user credentials, to the service. These parameters will be appended to GetCapabilities, GetMap, and GetFeatureInfo requests. Parameters intended for GetCapabilities requests should be set before the service is loaded.

When used together with a WmsLayer, if a parameter with the same name is defined in the layer's custom parameters, then layer-specific values will take precedence over service-wide parameter values.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also customParameters().

[virtual] void WmsService::setRequestConfiguration(const RequestConfiguration &requestConfiguration)

Reimplemented from RemoteResource::setRequestConfiguration().

Sets configuration parameters used for network requests sent by this task to requestConfiguration.

See also requestConfiguration().

[virtual] QUrl WmsService::url() const

Reimplemented from RemoteResource::url().

Returns the URL of this WmsService.

WmsVersion WmsService::version() const

Returns the version of the WMS service.

Feedback on this topic?