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.
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:
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.
Yes this works because the requests for the WMS are coming from the same domain. Your map is hosted on http://mapy.fotoraporty.pl/Mordy/ and the GeoServer is on http://mapy.fotoraporty.pl.
If you put your CesiumJS map on your website it will work.