-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3DTileset not receiving any url #138
Comments
It may be a problem of Cesium or webpack, not Resium. You can try with raw Cesium3DTileset of Cesium. import React, { useRef, useEffect } from "react";
import { Viewer, Cesium3DTileset } from "cesium";
const Test = () => {
const ref = useRef();
useEffect(() => {
if (!ref.current) return;
const viewer = new Viewer(ref.current);
viewer.scene.primitives.add(new Cesium3DTileset({
url: "YOUR URL"
}));
}, []);
return <div ref={ref} style={{ width: "300px", height: "300px" }} />
} |
Thank you very much. i still get the same result. the viewer is loading but not the 3d tileset. and no errors. i think too that it either a problem with cesium or webpack. |
You can use onTileLoad, onTileFailed, onReady event props to debug whether loading is done or failed. const Test = () => {
const ref = useRef(null);
return <Viewer>
<Cesium3DTileset
url="hogehoge/tileset.json"
onAllTilesLoad={(...args) => console.log("onAllTilesLoad", ...args)}
onInitialTilesLoad={(...args) => console.log("onInitialTilesLoad", ...args)}
onTileFailed={(...args) => console.log("onTileFailed", ...args)}
onTileLoad={(...args) => console.log("onTileLoad", ...args)}
onTileUnload={(...args) => console.log("onTileUnload", ...args)}
onReady={tileset => {
console.log("onReady", tileset);
ref.current.cesiumElement.zoomTo(tileset);
}}
/>
</Viewer>;
} |
Further more, i see in the example |
i have tried all of them and none of the are fired. i thought it's becuase its not getting anything in the url field therefore they are not firing |
It is because the json file of url is 404 not found. I'll fix it soon. Tileset data is here: https://github.com/darwin-education/resium/tree/master/.storybook/public/tileset |
yes. i dont get the "Failed to load resource" if i put a wrong address in the url. i dont get anythink. hence the frustration:) |
are you or do you know any experienced developers with resium than can help me when needed in my project? paid ofcoarse. i'm building a big project based on Cesium and Resium:) |
@nadavtal you could try placing your 3dtiles under the 'public' folder. it works for me. |
If the issue persists, please reopen the issue. |
The issue persist for me (TypeError: undefined is not an object (evaluating 'this._url = undefined')) with version 1.17.1, I try to put the json file in different locations and have the same problem (also with web json hosted files) |
Hello, i'm trying desperatley to insert a tileset in my 3dTileset component. how ever the "url" property is not working and not showing anything, also if i put an invalid address in it it doesnt show an error.
been trying for 2 days now with webpack without success.
any help?
The text was updated successfully, but these errors were encountered: