AnsweredAssumed Answered

Adding WMS layer to WAB Custom Widget

Question asked by Gerard2020 on Oct 13, 2020
Latest reply on Oct 13, 2020 by Gerard2020

I have develop 2D Custom Widget, and I would like to add a new layer from WMS Service (no ESRI).

More precisely, I would like to use one of layers of this WMS Service: 

http://geoserveis.icgc.cat/icc_mapesbase/wms/service?service=wms&version=1.1.1&request=GetCapabilities

 

So, I include the following code in widget.js without any result.

How can I add a new wms layer to this.map when execute widget ?

 

        this.wmsLayer = new WMSLayer({
          sublayers: [{name: "mtc5m"}]
        });
        this.map.addLayer(this.wmsLayer);
                       

Outcomes