I just upgraded from Cesium 1.15 to 1.24 last week. I noticed after the upgrade that while everything worked fine on PC browsers (Chrome and Edge) my iOS devices crash with either the Safari or Chrome browser with the following error message when the first action after loading is to pinch to zoom. If you move the map first and then zoom everything is ok.
This behavior only seems to occur if I use Camera.setView or Camera.flyTo.
I built my app with each version of Cesium from 1.16 through 1.23 until I found that this behavior started in 1.23. I see in the CHANGES document for 1.23 that there were some changes to Camera.setView and Camera.flyTo. I don’t know if these are related to this issue or not.
I put together a very simple example in Sandcastle that demonstrates this problem on both my iPhone and my iPad. To reproduce the behavior simply load the following code in Sandcastle and access the example with an iOS device. When Cesium loads pinch to zoom will produce the crash.
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var dblInitLon = -117.72456;
var dblInitLat = 33.06154;
var dblInitAlt = 342418.4;
var dblHeading = 0;
viewer.scene.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(dblInitLon, dblInitLat, dblInitAlt),
orientation: {
heading: Cesium.Math.toRadians(dblHeading),
pitch: Cesium.Math.toRadians(-90),
roll: 0.0
}
});
``
When I perform the steps above with either my iPhone or iPad I get the following error:
I don’t see that I’m doing anything wrong with the Camera.setView or Camera.flyTo calls. Any suggestions?
Thanks.