Hey all! I’m relatively new to the Cesium space and have been working on a project to get me introduced to the features and workflow. I already have a basic implementation that allows me to load and follow flights, add 3D models, draw polygons/polylines, and view 360 panoramas using AerialSphere’s API. My question comes into play now that I am trying to add a viewshed to help bring more context to the 360 viewer.
I am trying to add zhangti0708’s Github project found here: https://github.com/zhangti0708/cesium-viewshed
Although I’ve been struggling to get it working, I believe I’ve narrowed the issue to a mismatch in Cesium.js files. My project up until now has been using <script src="https://cesium.com/downloads/cesiumjs/releases/1.117/Build/Cesium/Cesium.js"></script>
for the Cesium.js file, but zhangti0708’s project has a Cesium.js file included with it.
When I use the Cesium.js from the cesium website, my project works great, but the viewshed doesn’t show and everything crashes when I click on anything in the viewer (giving this error message):
When I use the new Cesium.js included with the viewshed Github project, I can’t get my project to even load due to the amount of errors. These always seem to be along the line of:
and always occur when referencing anything “Cesium.something”, such as the line that caused the above error:
Cesium.ArcGisMapService.defaultAccessToken = arcgisAccessToken;
My programmer instinct is telling me that it’s some sort of mismatch between the 2 Cesium.js files I’m trying to use, but I’m unsure how to fix this while allowing both my project and the viewshed project to work correctly…
I am more than happy to provide any other information, as I know this is fairly vague and may not be enough info to help, but it’s also my first time posting on these forums, so any help is greatly appreciated! I’d love to understand why this is happening, and how to fix things like this in the future (multiple Cesium.js file compatibility issues). Thanks in advance!