Leafmap - works with Panel

Just for the record, leafmap now works with Panel.

import panel as pn
from leafmap import leafmap

pn.extension("ipywidgets")

m = leafmap.Map()
# One Line
m.add_markers(markers=[40, -100], shape='marker')
# Another line
m.add_markers(markers=[[40, -100], [35, -110]], shape='circle')
# Sort of one line :-)
m.add_markers(
    markers=[[40, -100], [35, -110]],
    shape='circle',
    radius=20,
    color='red',
    fill_color='#3388ff',
    fill_opacity=0.5,
)

pn.template.FastListTemplate(
    site="Leafmap", title="Adding Markers in one line",
    main=[m]
).servable()

3 Likes

Thank you Marc!

Does the leafmap toolbar (wrench) work?
I would like to create an application that allows the user to retrieve information from a STAC catalog and interact with it using other Panel features.

1 Like

Hi @simonetilia

Welcome to the community. What is the “toolbar (wrench)”? And what does “work” mean to you?

Do you have a minimum, reproducible example?