(Apologies if this winds up as a dupe post - tried posting this topic earlier, but it seems to have been swallowed by Google Groups.)
I’m seeing an error down inside ImageryLayer while trying to add a SingleTileImageryProvider with a limited Rectangle to the globe. We’ve got code that adds/removes that image with a new URL and Rectangle as some of our data changes. Here’s the stack trace from Firebug (note that “Cesium_debug.js” is the unminified version of Cesium.1.1):
TypeError: surfaceTile is undefined
ImageryLayer.prototype._createTileImagerySkeletons()Cesium_debug.js (line 108433)
GlobeSurfaceTileProvider.prototype._onLayerAdded/<()Cesium_debug.js (line 109584)
QuadtreePrimitive.prototype.forEachLoadedTile()Cesium_debug.js (line 111152)
GlobeSurfaceTileProvider.prototype._onLayerAdded()Cesium_debug.js (line 109583)
Event.prototype.raiseEvent()Cesium_debug.js (line 4396)
ImageryLayerCollection.prototype.add()Cesium_debug.js (line 110131)
We’re currently using Cesium 1.1, after having upgraded from b17 to b29, and then to 1.1. We don’t have any automated testing set up, so I’m not sure exactly when this regression started. The application code that’s calling ImageryLayerCollection.add() hasn’t changed in a while, so my guess is that it has to do with the Cesium upgrades. I may try checking out an earlier revision if I get some time, and see if there’s a difference.
A couple interesting notes here:
- The image does correctly show up on the globe, despite the error.
- While the error killed my app’s execution enough that it wasn’t able to continue updating the imagery. However, when I stuck a try/catch+log around the call to ImageryLayerCollection.add(), my app was able to keep adding and removing imagery layers, without that error being thrown again.
The try/catch seems to work as an adequate bandaid, but I’m very hesitant to just rely on that without knowing what the real issue is. The error’s obviously down inside Cesium, but the root cause could easily be something in my application.
Anyone out there have any ideas what might be going on?