I'm just trying to play a bit with the SandCastle tool: Interpolation example.
Is it possible to add a label on the tracked entity displaying the altitude or other informations? Sorry for a so generic question but I don't know really where to start.. I would like just to add an overlay box displaying the altitude when the 3d model or the billboard is clicked during the animation.
You can add a label to the same entity that adds the 3D model. In the interpolation example, add this code to the entity after ‘var entity = viewer.entities.add({’
label: {
text: new Cesium.CallbackProperty(function(){
var position = entity.position.getValue(viewer.clock.currentTime);
var carto = viewer.scene.globe.ellipsoid.cartesianToCartographic(position);
return 'Altitude: ' + carto.height.toFixed(3);
}, false),
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
pixelOffset: new Cesium.Cartesian3(0, -10, 0)
},