"WebMapServiceImageryProvider": Failed to obtain image

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 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

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/

This will help us assist you in debugging.

I will also point out that in addition to the docs for WebMapServiceImageryProvider - Cesium Documentation we also have a tutorials page on loading imagery layers here Visualizing Imagery – Cesium 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