Popup on click

Popups provide information about features through either click or hover interactivity events. Features can listen to both events or multiple properties from the same event. For more information on popups, run help(Popup).

In this example, the click event shows two attributes from the Layer with default column name titles.


In [1]:
from cartoframes.auth import set_default_credentials

set_default_credentials('cartoframes')

In [2]:
from cartoframes.viz import Layer, popup_element

Layer(
    'countries_africa',
    popup_click=[
        popup_element('pop_est'),
        popup_element('name_long')
    ]
)


Out[2]:
:
StackTrace
    ">