GeoserverTerrainProvider and pre release of b26

In order to ensure compatibility between GeoserverTerrain provider and Cesium b26 release, I updated the provider in compliance with terrain provider requirements ( getErrorEvent -> errorEvent, getCredit -> credit, getTilingScheme -> tilingScheme, isReady -> ready).

In my case, geoserver provides imagery layer (images via web map service) and terrain data (arraybuffers via web map service).

My update of Cesium was made in mars first.

In these following cases, I don't have problems:
- when imagery Layer is provided by bings server and terrain provided by Cesium Terrain provider
- when imagery Layer are provided by my geoserver and terrain provided by Cesium Terrain provider

In these following cases, Imagery layer and Terrain provider seem blocked:
- when imagery Layer is provided by bings server and terrain provided by my geoserver
- when imagery Layer are provided by my geoserver and terrain provided by my geoserver

Moreover, I found these facts during my debugging researches (firefox and chrome) :
- XMLHttpRequest for terrain tiles worked
- Imagery layer don't make XMLHttpRequest after get first level tiles (very low resolution level)
- Sometimes, I have problem with line "frustumCommandsList.length = numFrustums;" from

  function updateFrustums(near, far, farToNearRatio, numFrustums, frustumCommandsList) {
          frustumCommandsList.length = numFrustums;
          for (var m = 0; m < numFrustums; ++m) {
              var curNear = Math.max(near, Math.pow(farToNearRatio, m) * near);
              var curFar = Math.min(far, farToNearRatio * curNear);

              var frustumCommands = frustumCommandsList[m];
              if (!defined(frustumCommands)) {
                  frustumCommands = frustumCommandsList[m] = new FrustumCommands(curNear, curFar);
              } else {
                  frustumCommands.near = curNear;
                  frustumCommands.far = curFar;

Glad you updated your plugin to b26.

Sometimes, I have problem with line “frustumCommandsList.length = numFrustums;”

Please let us know if you can consistency reproduce this since we’ve heard of this issue before (#1477) but can’t reproduce it.


In fact I have a problem with the build 26: I updated my geoserverTerrainProvider in compliance with b26 requirements but it cannot work (I can see the downloads of data in debug mode but there is no changes of terrain elevation in display) and moreover the fact that geoserverTerrainProvider becomes the terrain provider of the scene.centralBody seems to block the imagery layer collection (no download of more precise images than level 1!!).

For information, I didn't find a protocol to always reproduce the issue #1477 but it often appears when I use SceneTransitioner.morphToColumbusView or SceneTransitioner.morphTo2D.

Did you see the breaking changes section of -

This release has several breaking changes where get/set functions were changed to properties as discussed here.


Yes I took in consideration to update my geoserver terrain provider. There is no error when I connect this provider with centralBody and Cesium can work with it because it can use requestTileGeometry, moreover "tilingScheme" and "ready" properties of geoserverTerrainProvider are always called

Do you have a runnable example of your updated terrain provider? I don’t see any updated code in the GitHub repository for your plugin.

My implementation of geoserverTerrainProvider in attached document

GeoserverTerrainProvider.js (26.5 KB)

I don’t have a Geoserver available to test against, so I can’t actually run the code, but one thing I noticed was that on line 231:


has changed to:


Otherwise, I suggest running in the debugger with it set to break on all exceptions, not just uncaught exceptions. That may help track down the earliest point of failure.

Another thing you can do to help see whats going on is to always make sure that all your promises EITHER are returned to the caller, or add an error callback that at least logs the error. For example, on line 74:

Cesium.when(Cesium.loadXML(urlGetCapabilities), function(xml) {

that.getMetaDatafromXML(xml, description);


If getMetaDatafromXML throws an exception, it will reject the overall promise, but there is no error callback attached, so it will fail silently. Newer versions of When.js, the promise library we use, have improved this situation, but I haven’t found the time to do the upgrade yet.

Thanks a lot for your code review, indeed I miss the change in tiling prototype and after correcting line 231, the plugin works.
I'll soon push the update of my implementation of geoserverTerrainProvider.