Can anyone else confirm if there is a compatibility issue between Cesium 1.9 and the latest available cesium-sensors? In particular, I am attempting to use RectangularSensor, which was working prior to upgrading to 1.9. Now, I get the following error:
TypeError: Cannot read property ‘length’ on undefined
at RectangularSensorVisualizer._onCollectionChanged
at new RectangularSensorVisualizer
at DataSourceDisplay.defaultVisualizersCallback
…
It appears as though _onCollectionChanged is called with “added” undefined. Did something change in Cesium 1.9 that would cause this issue?
I am using the last version of the plugin downloaded from github,
and according to the pull request I changed the line in the file Source/RectangularSensorVisualizer.js from entities to values.
I am still getting the same error.
Are there more files that need to be changed?
You need to change the line and also rebuild it so that the change gets propagated to the combined CesiumSensors.js file. Look at the forks of the repo. There may be versions where this was already done.
That fork updated the source file but still needs to be built before using. In other words, the file under the Build/ directory wasn’t updated. You’ll either need to build it yourself or try using the version here: https://github.com/mgoldgeier/cesium-sensors