There is an example for drawing polyline on Terrain by setting “clampToGround” to true like this:
shape = viewer.entities.add({
polyline : {
positions : positionData,
clampToGround : true,
width : 3
}
});
The example is here: https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Drawing%20on%20Terrain.html
Right now I have drawn a czml path with polylineOutline material and but I failed to draw it clamp to ground.
Part of the code:
var czml = [{
“id” : “document”,
“name” : “CZML Path”,
“version” : “1.0”,
“clock”: {
“interval”: “2012-08-04T10:00:00Z/2012-08-04T15:00:00Z”,
“currentTime”: “2012-08-04T10:00:00Z”,
“multiplier”: 10
}
}, {
“id” : “path”,
“name” : “path with GPS flight data”,
“description” : “
Hang gliding flight log data from Daniel H. Friedman.
Icon created by Larisa Skosyrska from the Noun Project
“availability” : “2012-08-04T10:00:00Z/2012-08-04T15:00:00Z”,
“path” : {
“material” : {
“polylineOutline” : {
“color” : {
“rgba” : [255, 0, 255, 255]
},
“outlineColor” : {
“rgba” : [0, 255, 255, 255]
},
“outlineWidth” : 5
}
},
“width” : 8,
“leadTime” : 10,
“trailTime” : 1000,
“resolution” : 5
},
“position” : {
“epoch” : “2012-08-04T10:00:00Z”,
“cartographicDegrees” : [
0,-122.93797,39.50935,0,
10,-122.93822,39.50918,0,
20,-122.9385,39.50883,0,
…
]
}
}];
Is there anyway to draw a czml path clamp to ground?