visualising images on Cesium globe from Geoserver

1. A concise explanation of the problem you're experiencing.

Hello,
I am trying to load Bhuvan imagery on to the Cesium globe through Geoserver.
I used WMS layer from bhuvan server and loaded in geoserver. I can visualise the output in geoserver. But while loading the same image on to the Cesium Globe, I am facing the error as :

An error occurred in "p": Failed to obtain image tile X: 1 Y: 0 Level: 0.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 0 Y: 0 Level: 0.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 1 Y: 0 Level: 1.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 1 Y: 1 Level: 1.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 3 Y: 0 Level: 1.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 0 Y: 0 Level: 1.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 2 Y: 0 Level: 1.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 0 Y: 1 Level: 1.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 3 Y: 1 Level: 1.
Cesium.js:477 An error occurred in "p": Failed to obtain image tile X: 2 Y: 1 Level: 1.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

<body>
<div id=“cesiumContainer”></div>
    <script>
        var viewer = new Cesium.Viewer(‘cesiumContainer’);
        var imageryLayers = viewer.imageryLayers;
        imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
            url: ‘http://localhost:8080/geoserver/wms’,
            layers: ‘vector:AP_ERO50K_0506’,
            parameters: {
                transparent: true,
                format: ‘image/png’
            }
        }));
    </script>
</body>

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I am trying to load imagery layers on Cesium for comparing them and to do Disaster studies.

4. The Cesium version you're using, your operating system and browser.

Cesium : 1.41
OS: Windows 10
Browser: Google chrome

Hi there,

Check the developer console for what errors you are getting that are preventing the tile requests. Most likely this is a CORS issue, you will need to set the proper configuration on your server.

Thanks,

Gabby