I know this is an often-asked-for feature, but every post that I can find is 2+ years old, so I'm hoping for some newer information. I'm trying to get some simple KML to display clamped to the ground, using the dragDropMixin. However, the polygons clip with the terrain, and the more I zoom in the worse it gets. Is there support for getting these polygons to properly drape over the terrain? Or does anyone know some alternatives that I can use to get a similar effect? (I have some control over the KML that will be used).
Here's how I set up the viewer:
<code>
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var dragDropOptions = {
clearOnDrop : true,
flyToOnDrop : true,
clampToGround : true
}
viewer.extend(Cesium.viewerDragDropMixin, dragDropOptions);
viewer.terrainProvider = new Cesium.CesiumTerrainProvider({
url : ‘https://assets.agi.com/stk-terrain/world’,
requestVertexNormals : true
});
</code>
Here is the KML:
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>The Empty Box</name>
<Polygon>
<extrude>1</extrude>
<altitudeMode>clampToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>
-90.0,30.0,10000
-90.0,31.0,10000
-91.0,31.0,10000
-91.0,30.0,10000
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
-90.66,30.33,10000
-90.33,30.33,10000
-90.33,30.66,10000
-90.66,30.66,10000
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</Placemark>
</kml>
And here is an example of what it looks like: