Click Billboards

Hi, is it possible to add some functions to the billboard? because when you click on the billboard it takes you to the location, can i add some features?

I did this by listening to the selectedEntityChanged event - viewer.selectedEntityChanged.addEventListener(clickHandler), where clickHandler takes an entity argument (in a somewhat unusual format, you can try to log it to see what’s inside). If you use React, it’s much easier to do with Resium (Entity | Resium) - it has various click handlers.

@Sergio_Paredes I would also recommend taking a look at the Picking functions of CesiumJS. You can see some examples in this sandcastle, including one for a billboard (click “pick entity”). If you tie that to a click action instead of mouse movement then you could achieve whatever affect you want after clicking on your billboard.

1 Like