Replies: 10 comments
-
Do you have to use JS packages? They both have corresponding Python libraries, which can put maps on your pywebio apps. |
Beta Was this translation helpful? Give feedback.
-
I tried with pywebio.output.put_html(html) for folium, but without success. The Python packages are more limited, so if there is a way to use them in pure js, it would be great! |
Beta Was this translation helpful? Give feedback.
-
Please take look at Leafmap: https://github.com/giswqs/leafmap |
Beta Was this translation helpful? Give feedback.
-
Did you get it to work? |
Beta Was this translation helpful? Give feedback.
-
It works for me: from pywebio import *
import folium
def main():
m = folium.Map(location=[45.5236, -122.6750])
output.put_html(m)
start_server(main, port=8080, debug=True) also @pstatonwx |
Beta Was this translation helpful? Give feedback.
-
@wang0618 thanks! was just checking to see if they were successful :) |
Beta Was this translation helpful? Give feedback.
-
Yes, I did! Sorry, for not giving the feedback before. I recommend using Ipyleaflet instead of Folium… It is more close to the original Leaflet js library. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Yes, it works on jupyter, but it is possible to implement on pywebio as well: `from ipyleaflet import Map def bmi(): if name == 'main': |
Beta Was this translation helpful? Give feedback.
-
Awesome!! Haha I deleted my comment right after I posted it because I was like "well that's a dumb thing to ask" |
Beta Was this translation helpful? Give feedback.
-
Not really dumb… It still doesn’t have the same interactivity as in jupyter. But, It would be great if pywebio works with ipywidgets! |
Beta Was this translation helpful? Give feedback.
-
Is there any way to use Leaflet.js on PyWebIO?
Kind Regards
Please move to Discussions - Feature Request for posting.
Beta Was this translation helpful? Give feedback.
All reactions