Currently on Cesium 1.20
Most of my visualizations are on water, nice flat surface, so you would think that they would render out fine clamped to ground.
However, a lot of the time, my polylines are rendering below the surface of the water, which leads to the lines moving around when the view is rotated. (See https://www.ka72.com/Track/t/289862 for a good example.)
Is there a way to get the lines to always render on the surface of the water? (Here’s an example of one that is working well. https://www.ka72.com/Track/t/155291 you may need to move the time slider to reveal the whole track.)
Ideally I’d still like to have some sense of the surrounding topography.
Here’s how I declare a typical provider view model:
var providerViewModels = ;
providerViewModels.push(new Cesium.ProviderViewModel({
name: ‘Bing Maps Aerial’,
iconUrl: Cesium.buildModuleUrl(‘Widgets/Images/ImageryProviders/bingAerial.png’),
tooltip: ‘Bing Maps aerial imagery \nhttp://www.bing.com/maps’,
creationFunction: function () {
return new Cesium.BingMapsImageryProvider({
url: ‘//dev.virtualearth.net’,
mapStyle: Cesium.BingMapsStyle.AERIAL
});
}
}));
When I declare the terrainProvider and load the datasource, it’s done with this (note clampToGround):
var terrainProvider = new Cesium.CesiumTerrainProvider({
url: ‘//assets.agi.com/stk-terrain/world’,
requestWaterMask: false
});
viewer.terrainProvider = terrainProvider;
viewer.dataSources.add(datasource.load(’<% =KmlUrl() %>’, {clampToGround: true})).then(function(datasource) {
Dylan.