I’m trying to display a local czml file’s contents on a map with React, Typescript and Resium. For some reason it keeps throwing the error This object was destroyed, i.e., destroy() was called. What am i doing wrong?
Here is the code:
function App() {
const position = Cartesian3.fromDegrees(-74.0707383, 40.7117244, 100);
const pointGraphics = { pixelSize: 10 };
return (
<Viewer full>
<Entity position={position} point={pointGraphics} />
<CameraFlyTo destination={Cartesian3.fromDegrees(20.483, 47.860, 6000)}></CameraFlyTo>
<CzmlDataSource data={'paths/lne.czml'}></CzmlDataSource>
</Viewer>
);
}
export default App;
The paths is in the public folder, I’ve already tried ./paths and /paths, with the same error. I also have the access token, but I deleted it from this codesnippet. Based on the Resium website, it should be used like this.
user25649565 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.