Is it possible to have a czml with a polygon on top of another polygon? can height be defined with “reference” to a extruded height? here is my example:
for some reason height isn’t working at all, whether i use reference or a number array or just use a single number it does nothing and doesn’t throw any exceptions.
var gallery = ‘…/…/SampleData/’;
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
sceneMode: Cesium.SceneMode.COLUMBUS_VIEW,
//Hide the base layer picker
baseLayerPicker: false,
//Use BingMaps
imageryProvider: new Cesium.BingMapsImageryProvider({
url: '//dev.virtualearth.net',
mapStyle: Cesium.BingMapsStyle.ROAD
}),
fullscreenButton: false,
homeButton: false,
navigationHelpButton: false,
navigationInstructionsInitiallyVisible: false,
animation: false,
geocoder: false,
infobox: false,
sceneModePicker: false,
selectionIndicator: false,
timeline: false
});
viewer.extend(Cesium.viewerEntityMixin);
var source;
Sandcastle.addToolbarButton(‘Change’, function() {
var source = viewer.dataSources.get(0);
source.entities.suspendEvents();
source.entities.entities[0]._polygon._positions.setValue(
Cesium.Cartesian3.fromDegreesArray(
[-111.00125, 41.00025,
-110.99975, 41.00025,
-110.99975, 40.99875,
-111.00125, 40.99875]
))
source.entities.entities[0]._polygon._material._color.setValue(new Cesium.Color(1, 0, 0, 1.0));
source.entities.entities[0]._polygon._extrudedHeight._values[0] = 200;
source.entities.entities[0]._polygon._extrudedHeight._values[1] = 1000;
source.entities.resumeEvents();
});
Sandcastle.addToolbarButton(‘Original’, function() {
var source = viewer.dataSources.get(0);
source.entities.suspendEvents();
source.entities.entities[0]._polygon._positions.setValue(
Cesium.Cartesian3.fromDegreesArray(
[-111.001, 41.0,
-111.0, 41.0,
-111.0, 40.999,
-111.001, 40.999]
))
source.entities.entities[0]._polygon._material._color.setValue(new Cesium.Color(0, 1, 1, 1.0));
source.entities.entities[0]._polygon._extrudedHeight._values[0] = 100;
source.entities.entities[0]._polygon._extrudedHeight._values[1] = 500;
source.entities.resumeEvents();
});
var Polygons = [
{
"id" : "document",
"version" : "1.0",
"clock":{
"interval":"2013-01-01T00:00:00Z/2013-01-03T00:00:00Z",
"currentTime":"2013-01-01T00:00:00Z",
"multiplier":200000,
"range":"LOOP_STOP",
"step":"SYSTEM_CLOCK_MULTIPLIER"
}
},
{
"id":"Bottom",
"name":"Sensor1",
"polygon":{
"show":true,
"material":{
"solidColor":{
"color":{
"rgba":[
0,255,255,255
]
}
}
},
"positions":
{
"cartographicDegrees":[-111.001, 41.0, 0.0,
-111.0, 41.0, 0.0,
-111.0, 40.999, 0.0,
-111.001, 40.999, 0.0]
}