Uncomment the following line to install leafmap if needed.
# !pip install leafmap
import leafmap
Update the package if needed.
# leafmap.update_package()
Create an interactive map.
data = "https://raw.githubusercontent.com/opengeos/leafmap/master/examples/data/us_states.json"
Map = leafmap.Map(center=[40, -100], zoom=4, add_google_map=False, layers_control=True)
Labeling data.
Map.add_labels(
data,
"id",
font_size="12pt",
font_color="blue",
font_family="arial",
font_weight="bold",
)
Map
Remove labels
Map.remove_labels()