reearth / resium

React components for 🌏 Cesium
https://resium.reearth.io
MIT License
747 stars 135 forks source link

The official documentation for importing 3D Tiles data does not work, and I am unable to import my own 3D Tiles data. #678

Closed FANG-200 closed 1 month ago

FANG-200 commented 1 month ago

import { Viewer, Cesium3DTileset } from "resium"; import { IonResource } from "cesium";

function App() { let viewer; // This will be raw Cesium's Viewer object.

const handleReady = tileset => { if (viewer) { viewer.zoomTo(tileset); } };

return ( <Viewer full ref={e => { viewer = e && e.cesiumElement; }}>

</Viewer>

); }

export default App; This is the example code provided in the official documentation for importing 3D Tiles data, but I am unable to run it. I uploaded my own 3D Tiles data to Cesium, with an ID of 2751705. I can confirm the data is correct because I can see the building data loaded successfully through Cesium's preview. I can also ensure that my framework has imported all the necessary libraries correctly, as other official code works perfectly. I am using the REACT + VITE + JavaScript framework. 屏幕截图 2024-10-15 231906