Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Click events in maps


I am working with maps. So far I’ve been able to display the data and the information which is shown on hover is correct.

Now I am looking at click events. I’d like to bind functions to click events in a way that it matters on which country I click.
Currently, I can bind a function to a click anywhere in the map. Is there a way to detect click events in a country-specific way?


Have you taken a look at ?

I did but not sure how to apply that to a choropleth map.

like this:

Yep… that’s what I mean. I got to that point. The question is if it is possible to distinguish between the different countries. In your example, that you bind one function to Canada, and another to USA and a third one to Russia.


1 Like

Perfect. That’s exactly what I meant.
Thanks a lot Etienne for sharing how it can be done!
I appreciate it!