Hello,
Point and line geometries with 3D coordinates are drawn in 3D.
However, 3D polygons are drawn on the ellipsoid. See sandcastle example at the bottom.
Is it the expected behaviour?
I expected the case where all Z coordinates are identical to be handled,
the polygon being translated from the ellipsoid.
With PolygonGeometry, I may use a modelMatrix or set height/extrudedHeight.
With GeoJson, is there a workaround?
BR,
Guillaume
Sandcastle example - point and line are 3D, polygon is not
//Create the viewer
var viewer = new Cesium.Viewer('cesiumContainer');
Cesium.viewerEntityMixin(viewer);
var geo = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [102.0, 0.6, 1e5]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[102.0, 0.0, 1e5], [103.0, 1.0, 1e3], [104.0, 0.0, 1e5], [105.0, 1.0, 1e2]
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[100.0, 0.0, 1e6], [101.0, 0.0, 1e6], [101.0, 1.0, 1e6], [100.0, 1.0, 1e6],
[100.0, 0.0, 1e6]
]
]
}
}
]
};
var dataSource = new Cesium.GeoJsonDataSource();
viewer.dataSources.add(dataSource);
dataSource.load(geo);
//Reset the scene when switching demos.
Sandcastle.reset = function() {
var camera = viewer.scene.camera;
camera.lookAt(Cesium.Cartesian3.fromDegrees(100, 0, 5000000),
Cesium.Cartesian3.fromDegrees(100, 0, 0), Cesium.Cartesian3.UNIT_Z);
};