I am trying to display a label on click of czml point, since this point is formed on some coordinated and not an html dom and contains no id or class name, is there a way to display a label when the czml point is click at the same coordinates ?
Have you seen the picking code example?
https://sandcastle.cesium.com/index.html?src=Picking.html
That shows you how you can create a label at the mouse position.
Thanks much for responding. I will try this.
Pick entity will not fulfil my purpose. here is what i am trying to achieve:
https://sandcastle.cesium.com/index.html?src=CZML%20Point.html&label=CZML
when i click the czml point, it should add a label of my name:
here is my code:
function addlabel(viewer, lat, lng) {
viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(lng,lat),
label: {
text: ‘kulvinder’
}
});
}