# "WebMapServiceImageryProvider": Failed to obtain image

**URL:** <https://community.cesium.com/t/webmapserviceimageryprovider-failed-to-obtain-image/38730>\
**Category:** CesiumJS\
**Created:** [February 18, 2025, 1:28pm UTC](https://community.cesium.com/t/webmapserviceimageryprovider-failed-to-obtain-image/38730 "2025-02-18T13:28:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amir\_hossein](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/amir_hossein/32/28167_2.png) [@amir\_hossein](https://community.cesium.com/u/amir_hossein)\
**Post date:** [February 18, 2025, 1:28pm UTC](https://community.cesium.com/t/webmapserviceimageryprovider-failed-to-obtain-image/38730/1 "2025-02-18T13:28:05Z")

</div>

i have 2 images .tiff and serve the rgb with geoserver and for second image i use global mapper for “Cesium tile format” and the result is x/y/z.terrian files

my geoserver image is correctly and other image with global mapper checked and its correct too  
now i want show the rgb image as 3d in cesium but i have an error in console.log:  
An error occurred in “WebMapServiceImageryProvider”: Failed to obtain image tile X: 1 Y: 0 Level: 0.

An error occurred in “WebMapServiceImageryProvider”: Failed to obtain image tile X: 2 Y: 0 Level: 1.

i check cors first and it’s correct too and have not any problem and i can load tiles/layer.json correct  
i want show my rgb image (serve with geoserve) as 3d in ceium my code:

import { useRef } from “react”;  
import { Viewer, ImageryLayer, Cesium3DTileset } from “resium”;  
import { WebMapServiceImageryProvider, WebMercatorTilingScheme } from “cesium”;

function App() {  
const ref = useRef(null);

// Set up the WMS Imagery provider  
const imageryProvider = new WebMapServiceImageryProvider({  
url: “[http://my](http://my) ip:my geoserver port/geoserver/ThreeD/wms”,  
layers: “ThreeD:Ortho”,  
parameters: {  
service: “WMS”,  
version: “1.1.0”,  
request: “GetMap”,  
styles: “”,  
format: “image/png”,  
srs: “EPSG:4326”,  
transparent: true,  
tilingScheme: new WebMercatorTilingScheme()  
},  
});

return (  
  
{/\* Imagery Layer for WMS \*/}

```
  {/* Load the 3D Tileset (Terrain) */}
  <Cesium3DTileset
    url="http://my ip:my tile port/tiles/layer.json" // Replace with your layer.json URL
    onReady={(tileset) => {
      ref.current?.cesiumElement?.zoomTo(tileset); // Zoom to the tileset when ready
    }}
  />
</Viewer>

```

);  
};

export default App;

please help me for fix it

---

<div class="post-metadata">

**Author:** ![Luke\_McKinstry](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/luke_mckinstry/32/25557_2.png) [@Luke\_McKinstry](https://community.cesium.com/u/Luke_McKinstry)\
**Post date:** [February 18, 2025, 9:37pm UTC](https://community.cesium.com/t/webmapserviceimageryprovider-failed-to-obtain-image/38730/2 "2025-02-18T21:37:18Z")

</div>

Hi @amir_hossein ,

Thanks for your post and welcome to the Cesium community.

In order to assist in debugging, would you be willing to create an example reproducing your issue loading the WMS layer from the geoserver using our sandcastle tool [https://sandcastle.cesium.com/](https://sandcastle.cesium.com/)

This will help us assist you in debugging.

I will also point out that in addition to the docs for [WebMapServiceImageryProvider - Cesium Documentation](https://cesium.com/learn/cesiumjs/ref-doc/WebMapServiceImageryProvider.html?classFilter=WebMapServiceImageryProvider) we also have a tutorials page on loading imagery layers here [Visualizing Imagery – Cesium](https://cesium.com/learn/cesiumjs-learn/cesiumjs-imagery/) which may be helpful if you have not consulted it yet.

Please let us know if you can provide a sandcastle example to reproduce the issue, and we can continue on from there to assist you with debugging and getting your imagery loaded into Cesium.

Thanks,  
Luke
