Problem with WMS as basemap


I need to add WMS (served by geoserver) as basemap in my Cesium project. According to instruction, which i found in the Internet, i’m using Cesium.WebMapServiceImageryProvider function.

I received the following error in the web browser console:

An error occurred in “WebMapServiceImageryProvider”: Failed to obtain image tile X: 2305 Y: 430 Level: 11.

I attach link to the code : project

Can you help me?

Best regards,

Welcome back to the Cesium forum Adam!

There’s two issues going on here - first, you’re loading WMS over http, while your project (Sandcastle) is hosted over https, so the browser will reject these requests as insecure.

Second, it looks like this WMS server is not configured to allow requests made from other domains. If you try to run your project locally over http you’ll see this error:

Access to XMLHttpRequest at ‘’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Omar, thanks for response.

Ok, unfortunately i can’t loading WMS from this geoserver over HTTPS.

On the other hand, i use the same WMS in web-application such as openlayers and it works fine, so the geoserver allow requests made from other domains.

What do you suggest to do in my case?

How are you running your OpenLayers application? Is it on your own website or on a local server?

If OL can access it then CesiumJS should be able to as well if you run it from the same web server.

Link to OL map: [map ](

OL application is on the web hosting. Can you try to add above WMS to any sample project?

Yes this works because the requests for the WMS are coming from the same domain. Your map is hosted on and the GeoServer is on

If you put your CesiumJS map on your website it will work.