Hi guys, i’m currently working on Contour Line feature and i faced with complicated issue related to display height for each visible contour line. Any idea about this? Thanks
Hi @dipperpine0411,
Welcome to the Cesium community!
Could you give a little bit more detail about:
- What you’re trying to achieve? (A reference image or example sandcastle could go a long way)
- What exactly the issue is? (An error or crash? Something just doesn’t look right?)
- Which version of Cesium you’re using? (Is this for Unreal / Unity, CesiumJS (web)? Which version?)
Thanks,
Matt
Hi @mzschwartz5 . Thank for you reply. Currently, i want add label to display height for each contour line. I haven’t found a way to display it correctly yet. I’m using cesium web version 1.136. Thanks
Are you able to provide a demo sandcastle showing how you’re drawing the contour lines, so I can see what APIs you’re currently using?
In general, to add labels in CesiumJS, you would use the Label API (often starting by adding a LabelCollection and adding labels to it).
If the contour lines are part of, say, a GeoJsonDataSource, you could iterate through the entities in the data source and add labels to entities according to your application’s needs. Here’s a sandcastle eexample that loads from geojson.
