I’ve found some online information relative to how to run Cesium in my React App. It seems simple, yet I get an error message that says
The console suggests that the failure is in the download of the JSON performed as part of the image layer access.
The basic cesium app is running as seen by the controls:
I construct the viewer as follows.
const viewer = new Cesium.Viewer("cesiumContainer", {
terrain: Cesium.Terrain.fromWorldTerrain(),
geocoder: false,
baseLayerPicker: false
});
I’ve also tried the following (to disable the need for bingmaps:
const osm = new Cesium.OpenStreetMapImageryProvider({
url: 'https://a.tile.openstreetmap.org/'
});
const csm = new Cesium.IonImageryProvider({ assetId: 3 })
const viewer = new Cesium.Viewer("cesiumContainer", {
imageryProvider: osm,
geocoder: false,
baseLayerPicker: false
});
Though I’ve used cesium in the past its been a few years. I have also tried resium, and I end up seeing the same exact error message. At this point I feel like I’m close.
This code runs inside a react useeffect. The uncaught exception points to engine/source/core/Resource.js
The JSON parse fails because the resource data is not valid json
Please provide help if you can.