I tried wms layers in cesium from this site but im unable to add any.
I tried adding using below codes
var provider = new Cesium.WebMapServiceImageryProvider({
layers : ‘World_Political_Boundaries_WM’,
parameters : {
transparent : true,
format : ‘image/png’
}
});
provider.readyPromise.then(function(){
console.log(“Success!”);
}).otherwise(function(error){
console.log(“Fail”, error);
});
imageryLayers.addImageryProvider(provider);
``
var imageryLayers = viewer.imageryLayers;
imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
layers : ‘Topographic_Base_Map_WM’,
parameters : {
service: ‘WMS’,
version: ‘1.1.0’,
request: ‘GetMap’,
transparent : ‘true’,
format : ‘image/png’
},
proxy: new Cesium.DefaultProxy(’/proxy/’),
}));
``
i also checked whether im getting response using promise, and also used cors filter plugin.
But im not able to add.
im always getting this kind of message in console
An error occurred in “c”: Failed to obtain image tile X: 0 Y: 0 Level: 0.
What im doing wrong.
I also checked the wms layers in arcgis they are working.