Features going below ground/elevations

Hi,

My features are going below the elevations.

Code:

var scene = this.viewer.scene;

var globe = scene.globe;

globe.depthTestAgainstTerrain = true;

var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({

url: ‘/terrain/elevations’

});

this.viewer.terrainProvider = cesiumTerrainProviderMeshes;

this.viewer.dataSources.add(Cesium.GeoJsonDataSource.load(‘features.geojson’, {

stroke: Cesium.Color.HOTPINK,

fill: Cesium.Color.PINK,

strokeWidth: 3,

markerSymbol: ‘?’

}));

What could be the issue?

In 2d all features can be seen, but in 3d at a partiular zoom onwards the features get embedded below the ground and can’t be seen draped.

Hi there,

Try adding clampToGround : true to your options passed to GeoJsonDataSource.load()

Hope that helps,

  • Rachel