Bind own popup to when entity is clicked?


I was wondering how I can call a function when an entity is clicked. The function will open a popup I have created. Right now I have built my own sidebar menu using html,css and js however the only way of getting to the popup right now is to go through the menu I built.

I want to be able to call the function which open my popup, when for example a billboard is clicked, it would be much more convenient.

It would be very helpful with a code snippet.

Thanks in advance

Hi there,

I would start by looking into ScreenSpaceEventHandlers and Picking.

Thanks, I now got it to work the way I wanted. But a question, can you disable the infobox for a specific entity or is it only “overall” in the viewer construction?

At least through the Entity API itself, the way to control the infobox content is via the name and description fields, as described in the Creating Entities Tutorial. I don’t believe it provides a way to enable or disable the infobox functionality per-entity.


Yes I am aware of the tutorial information. What I wanted to achive was not having the infobox appear once the billboard is clicked since I created my own popup/infobox to billboards. But I still want the infobox to be displayed when interacting with buildings so the attribute data can be displayed with ease. I will try to look for a work around.