On my project in localhost I need to modify a litle bit portion of terrain that overlap in some point my tileset.
I try with Cesium.HeightmapTerrainData****but I don’t have any result.
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
terrainProvider: Cesium.createWorldTerrain()
});
viewer.camera.setView({
destination : Cesium.Cartesian3.fromDegrees(9.111672,39.218, 400),
orientation: {
heading : 0,
pitch : -0.5,
roll : 0.0
}
});
var rect = new Cesium.Rectangle.fromDegrees(9.111672,39.219757, 9.118092, 39.227483);
var height = 2;
// a flat piece of terrain
var terrainData = new Cesium.HeightmapTerrainData({
buffer : new Float32Array([height, height, height, height]),
width : 2,
height : 2
});
var tileset = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: ‘ca-dataset/tileset.json’
})
);
I expect that in the “rect” the terrain is flat to 2m height but nothing.
There are any solutions?
Thanks in advance.