Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add streamlit support for heremap module #118

Closed
giswqs opened this issue Oct 2, 2021 · 2 comments
Closed

Add streamlit support for heremap module #118

giswqs opened this issue Oct 2, 2021 · 2 comments
Assignees
Labels
Feature Request New feature or request
Projects

Comments

@giswqs
Copy link
Member

giswqs commented Oct 2, 2021

To add stseamlit support for the heremap plotting backend, we need to save the map as an HTML file. However, it seems the exported HTML lose the map controls (e.g., zoom control, fullscreen control). @sackh Any advice?

import leafmap.heremap as leafmap
from ipywidgets.embed import embed_minimal_html

m = leafmap.Map()
m

embed_minimal_html('heremap.html', views=[m])

image

The same method works fine for ipylealfet. The exported HTML has the map controls.

image

@giswqs giswqs added the Feature Request New feature or request label Oct 2, 2021
@giswqs giswqs self-assigned this Oct 2, 2021
@giswqs giswqs added this to To do in leafmap via automation Oct 2, 2021
giswqs added a commit that referenced this issue Oct 3, 2021
@sackh
Copy link
Collaborator

sackh commented Oct 4, 2021

@giswqs I will look into it.

@giswqs
Copy link
Member Author

giswqs commented Oct 18, 2021

This feature has been implemented. See https://leafmap.org/heremap/#leafmap.heremap.Map.to_streamlit. Currently the exported map does not contain controls (e.g., zoom control, layer control), which needs to be fixed by the upstream heremap widget.

import leafmap.heremap as leafmap
m = leafmap.Map()
m.to_streamlit()

@giswqs giswqs closed this as completed Oct 18, 2021
leafmap automation moved this from To do to Done Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
Development

No branches or pull requests

2 participants