I got the same error and solved it by going to the Network section in Chrome Dev Tools to view the error response. It gave me a link where I needed to enable permissions for using Google Tilesets.
I’m not sure if this was the exact link but it should work for you… Google Cloud console
And I already set the permissions for Map Tiles API. However, after some 3DTiles are loaded, 403 errors are displayed and the tiles do not seem to display properly. (Please see screenshot) For example, Is there a need to set a limit on the amount of tile used on Google Cloud Console?
I think I am facing the same situation, and not knowing what’s the problem.
To provide more in details from my side.
I am using the cesium-webpack-example from the github repo, and I revised the code in index.js to the following as the previous comment.
import * as Cesium from "cesium";
import "cesium/Build/Cesium/Widgets/widgets.css";
import "../src/css/main.css"
// Your access token can be found at: https://cesium.com/ion/tokens.
// This is the default access token
Cesium.Ion.defaultAccessToken = 'e.....';
Cesium.GoogleMaps.defaultApiKey = 'A....;
async function main() {
const viewer = new Cesium.Viewer("cesiumContainer", {
timeline: false,
animation: false,
sceneModePicker: false,
baseLayerPicker: false,
});
// // The globe does not need to be displayed,
// // since the Photorealistic 3D Tiles include terrain
viewer.scene.globe.show = false;
// Add Photorealistic 3D Tiles
try {
const tileset = await Cesium.createGooglePhotorealistic3DTileset();
console.log(tileset)
viewer.scene.primitives.add(tileset);
console.log(viewer.scene.primitives)
} catch (error) {
console.log(`Error loading Photorealistic 3D Tiles tileset.\n${error}`);
}
viewer.scene.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(
174.7615727937406,
-36.84333832264615,
400
),
orientation: {
heading: 2.165775125478591,
pitch: -0.5620692967690193,
roll: 6.283180485546438
}
});
}
main();
The console.log()s showed there are something already be put in viewer.scene.primitives but somehow not being displayed.