WMS Layer not displaying

I tried to add WMS Layer but it is not displaying. Here I give my server link and code. Please help

var viewer = new Cesium.Viewer(‘cesiumContainer’);

// Add a WMS imagery layer
var imageryLayers = viewer.imageryLayers;
imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
url : ‘http://34.211.24.18:1213/cgi-bin/ig?IEG_PROJECT=wgrid’,
layers : ‘wgrid_5’,
parameters : {
transparent : true,
format : ‘image/png’
}
}));

you should try
new Cesium.WebMapServiceImageryProvider({
url : ‘http://34.211.24.18:1213/cgi-bin/ig’,
layers : ‘wgrid_5’,
parameters : {
transparent : true,
format : ‘image/png’,
EG_PROJECT:‘wgrid
}
})

Thanks farouk for your input.

I have tried with code given by you but still same problem. See both code has no error and wms tile is come properly form wms server. I checked and debugged. But some how this downloaded png image is not displaying on globe. Link of my WMS is avilabel live so any one can check. Please check why downloaded wms image is not displaying?

Maybe you have a CORS issue (check in the forum).

Yes you are right it was CORS problem.

I just added following line in my apache configuration file and restart my wms server.

<Directory “${SRVROOT}/cgi-bin”>
Header always set Access-Control-Allow-Origin “*”

Now my WMS services are displaying properly. :slight_smile:

Thanks farouk