Adding WMS v 1.3.0 in Mapbox GL JS

So, I want to add WMS v 1.3.0 layer in Mapbox GL JS.

The WMS source is :

And Here is my code :

map.addSource('wms-test-source', {
            'type': 'raster',
            'tiles': [
            'tileSize': 256
                'id': 'wms-test-layer',
                'type': 'raster',
                'source': 'wms-test-source',
                'paint': {}

I have tried using this tutorial :,
But I still can’t figure why i can’t add this WMS layer, is this because the WMS version is 1.3.0?
I’ve change the link many times and get some error Http 400 and sometimes CORS.
I’ve tried this WMS in QGIS and leaflet, and this WMS works well, please help!🙏🙏

and here my jsfiddle snippet :

126 thoughts on “Adding WMS v 1.3.0 in Mapbox GL JS”