Context:
For the purpose of our project, we developed a custom map server that we tested on some GIS systems and we didn’t have any problems. The map server uses GDAL (gdal2tiles.py) to generate the tiles it serves.
We are trying to use our server with a Cesium app but we are facing some issues:
The Cesium widget is set with a custom blue-marble imageryProvider.
let defaultImageryProvider = new UrlTemplateImageryProvider({
url: MAP_SERVER_URL + DEFAULT_WORLD_MAP + '/{z}/{x}/{y}',
tilingScheme: new WebMercatorTilingScheme()
});
this.viewer = new Viewer(this.dom, {
imageryProvider: defaultImageryProvider,
baseLayerPicker: false,
homeButton: false,
timeline: false,
geocoder: false,
navigationHelpButton: false,
fullscreenButton: false,
sceneModePicker: false,
animation: false
});
Other maps are added on user’s clicks via new imagery provider
let mapImageryProvider = new UrlTemplateImageryProvider({
url: MAP_SERVER_URL + mapName + '/{z}/{x}/{y}',
minimumLevel: mapZoomMin,
maximumLevel: mapZoomMax,
tilingScheme: new WebMercatorTilingScheme(),
rectangle: mapRectangle
});
this.viewer.scene.imageryLayers.addImageryProvider(mapImageryProvider);
All imageryProvider are UrlTemplateImageryProvider with WebMercatorTilingScheme. The imageryProviders do their requests on our homemade map server.
The bug has been reproduced on Cesium v.1.81 & 1.83 with Chrome & Mozilla browser on Windows 10
Bug:
When the user zoom on the right border of some maps, cesium crashes.
Callstack:
An error occurred while rendering. Rendering has stopped.
TypeError: Cannot read property ‘west’ of undefined
TypeError: Cannot read property ‘west’ of undefined
at ImageryLayer._createTileImagerySkeletons (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2788646)
at prepareNewTile (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2771725)
at Function.GlobeSurfaceTile.initialize (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2775167)
at Function.GlobeSurfaceTile.processStateMachine (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2775307)
at GlobeSurfaceTileProvider.loadTile (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2823537)
at processSinglePriorityLoadQueue (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2879686)
at processTileLoadQueue (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2879294)
at QuadtreePrimitive.endFrame (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2869716)
at Globe.endFrame (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:2891354)
at render (http://127.0.0.1:8082/dep/cesium/Build/Cesium/Cesium.js:1:3292043)