Hi,
I have the following code in Cesium Sandcastle and I am trying to add a WMS from Geoserver backend. I am getting the error TypeError: Cannot read properties of undefined (reading ‘addEventListener’) (on line 15) and TypeError: layers[i].queueReprojectionCommands is not a function
const viewer = new Cesium.Viewer(“cesiumContainer”);
const wmsShambamap={
url: ‘https://shambamap.org:8443/geoserver/Africa/wms’,
layers: ‘Africa:africa’,
parameters: {
service: ‘WMS’,
format: ‘image/png’,
transparent: true,
crossOrigin: null,
srs : ‘EPSG:4326’
},
};var webMapServiceImageryProvider = new Cesium.WebMapServiceImageryProvider(wmsShambamap);
viewer.scene.imageryLayers.add(webMapServiceImageryProvider);