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:
http://imgur.com/a/LMBrp
Your coordinates cannot include a Z. You need X-Y coordinate pairs for clampTo Ground to work. Not even a zero, no Z. Your example shows X-Y-Z coordinates. I share your pain, but at least you have control iver the KML, and it's worth the effort to strip out those Z values. You must download the April update being released 4/03! There is an issue being fixed that affects polygons clamped-to-ground when viewed in 2D. But the current release is fine for 3D view.
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/_Mo62fjtut8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.