For example:
const billboard = billboardCollection.add({
heightReference: Cesium.HeightReference.RELATIVE_TO_TERRAIN,
position: Cesium.Cartesian3.fromDegrees(86.92493, 27.98868), // without height
image: img
})
It will set the billboard refer to the height of terrain at (86.92493, 27.98868).
Could I get the height of the billboard?
Like the degree used above is the location of Mount Qomolangma. So expect we may have a attr like:
console.log(billboard._realHeight) // about 8000.
Hi there,
billboard._actualPosition
exists, but is private API and is such subject to change with any future releases.
Could it export a public API to get the _actualPosition
?
Sometimes we get a list of marks with longitude and latitude (without height) and pin them on the terrain. If we want to viewer.flyTo()
the marks, it seems we have to use _actualPosition
to do that; otherwise, it cannot get the height.
Additionally, we often transform Cartesian3 to windowPos to locate a DOM on the page where the mark is. It is challenging to achieve that without height. Using a DOM in a billboard is an option, but it is difficult to use components in it with React
, Vue
, or other frameworks.