Polyline horizontal over terrain, vertical under terrain

I have plotted a grid with polyline entities:

                     var newPolyline = new Cesium.PolylineGraphics({
					  positions: Cesium.Cartesian3.fromDegreesArray(gr100kCoord),
					  width: mywidth,
					  material: mymaterial,
					  arcType: Cesium.ArcType.RHUMB
		  var newPolylineEntity = new Cesium.Entity({
			  name: "",
			  polyline: newPolyline

In a region I have loaded terrain as quantized mesh (as Cesium3DTileset). In the screenshot you see that the horizontal lines are plotted over the terrain, where as the vertical lines are plotted under the terrain.

What did happen ?

This looks like it could be a potential bug. Are you able to provide a Sandcastle example of the code? This can help us further debug and determine whether this is a bug in CesiumJS or not.

Have you tried adding the clampToGround property of polylines?


clampToGround works, but I wonder why it works before without at the horizontal lines and not at the vertical lines.

I have done a sandcastle based on the Parallels and Meridians - but the ion asset/terrain cannot be shared, it is private,

var viewer = new Cesium.Viewer(“cesiumContainer”, {
terrainProvider: new Cesium.CesiumTerrainProvider({
url: Cesium.IonResource.fromAssetId(37255),

Regards RĂĽdiger

1 Like