Hello,
I have json data in 2D and 3D. How lead with 2D ou 3D coordinates to CLAMP_TO_GROUND id 2D?
See my example:
viewer.dataSources.dataSourceAdded.addEventListener(function(collection,dataSource){
if (Cesium.defined(dataSource)) {
var entities = dataSource.entities.values;
for (var i = 0; i < entities.length; i++) {
var entity = entities[i];
//console.log(dataSource.entities.values[i]);
if (Cesium.defined(entity.polygon)) {
console.log("...polygon");
entity.polygon.material = createCallback(entity);
entity.polygon.width = 1;
//entity.polygon.perPositionHeight = true;
entity.polygon.outlineColor = Cesium.Color.RED;
entity.polygon.outlineWidth = 1;
entity.polygon.granularity = Cesium.Math.RADIANS_PER_DEGREE;
if (data2d == true){entity.polygon.extrudedHeight = 2500;}
else {entity.polygon.extrudedHeight = 0;};
}
}
}
});
Thanks