In [1]:
Copied!
# %pip install leafmap
# %pip install leafmap
In [2]:
Copied!
import leafmap.maplibregl as leafmap
import ipywidgets as widgets
import leafmap.maplibregl as leafmap
import ipywidgets as widgets
In [3]:
Copied!
tw = leafmap.TabWidget(
title="Dashboard",
tabs=("Home", "Map", "Settings"),
icons=("mdi-home", "mdi-map", "mdi-cog"),
show_panel_titles=False,
)
# Customize dialog
tw.set_help_title("About this dashboard")
tw.set_help_content(
widgets.HTML(
"""
<p><b>Shortcuts</b></p>
<ul>
<li>1 / 2 / 3 — switch tabs</li>
<li>R — refresh</li>
<li>? — help</li>
</ul>
"""
)
)
m = leafmap.Map(
projection="globe", style="liberty", sidebar_visible=True, height="800px"
)
m.create_container()
home_tab = widgets.HTML(
"""
<h1>Welcome to the Leafmap Visualization Dashboard</h1>
<p>This is the home tab.</p>
<img src="https://assets.gishub.org/images/geog-312.png" width="100%">
"""
)
settings_tab = widgets.HTML(
"""
<h1>Settings</h1>
<p>This is the settings tab.</p>
"""
)
tw.set_tab_content(0, home_tab)
tw.set_tab_content(1, m.container)
tw.set_tab_content(2, settings_tab)
display(tw.widget)
tw = leafmap.TabWidget(
title="Dashboard",
tabs=("Home", "Map", "Settings"),
icons=("mdi-home", "mdi-map", "mdi-cog"),
show_panel_titles=False,
)
# Customize dialog
tw.set_help_title("About this dashboard")
tw.set_help_content(
widgets.HTML(
"""
"""
)
settings_tab = widgets.HTML(
"""
Shortcuts
- 1 / 2 / 3 — switch tabs
- R — refresh
- ? — help
Welcome to the Leafmap Visualization Dashboard
This is the home tab.

Settings
This is the settings tab.
""" ) tw.set_tab_content(0, home_tab) tw.set_tab_content(1, m.container) tw.set_tab_content(2, settings_tab) display(tw.widget)