Enabling in Cesium terrain causes KML lines and polygons to shift around when moving

If view KML files with a terrainProvider then geometries appear to be shifting as you zoom in/out and pan around.

If no terrainProvider is enabled in Cesium (tested with v1.18) then all examples are displayed same as they appear in Google Earth.

The problem is clearly seen with these examples http://kml-samples.googlecode.com/svn/trunk/morekml/Lines_and_Paths/

In particular these files illustrate the issue:

  • Line_Strings.Relative_Extruded.kml
  • Line_Strings.Tessellated.kml
  • Line_Strings.Untessellated.kml
  • Lines_and_Paths.Linear_Ring.kml

Enable terrainProvider and drag/drop then drag/drop these kml files onto the map :

Jason, KML data on terrain is not currently supported in Cesium. The effect you are seeing is the data being drawn under the terrain (by default data is not currently obscured by terrain). We hope to support this feature soon, but there are lots of issues that need to be worked out. This pull request will add initial support, so you can follow that for more information: https://github.com/AnalyticalGraphicsInc/cesium/pull/3406