-
Notifications
You must be signed in to change notification settings - Fork 362
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
Save to HTML #566
Comments
I was searching for this feature as well. It would be a great addition to ipyleaflet. Here is a relevant post on stackoverflow. |
Thanks for the link :) I hate that the answer to "How to save the ipyleaflet map to HTML?" is "Use Folium" :P |
I don't think pydeck is using the widget machinery here for the to_html. https://ipywidgets.readthedocs.io/en/latest/embedding.html#python-interface should do the job, which is an upstream port of what ipyvolume did, but a bit more low level. https://github.com/maartenbreddels/ipyvolume/blob/159d0e3416734a6736fafe3fa8b3280ea3bc6501/ipyvolume/embed.py#L121 is much simpler to use (slightly ipyvolume specific), and can even download the js files next to it (so it is completely standalone). I'd love to see a |
I did not know about the |
I answered it at https://stackoverflow.com/questions/44800396/python-ipyleaflet-export-map-as-png-or-jpg-or-svg/61538586#61538586 |
Thanks a lot! We could either document this properly in ipyleaflet, or add a I would actually be in favor of adding the |
just assign to DOMWidget.save :-D |
:P I mean in ipyleaflet for now. But we could upstream it later if everybody agrees. |
It is possible. I wasn't sure if it was a good idea to expose it to the But you can definitely do that changing the layout of the map: |
Hi @martinRenou, I can confirm that using |
As far as I know, there is no proper way that for doing this. You can always modify the output HTML and include the proper CSS in the page that allows implement this behavior, but it's not great. You can also use the fullscreen control to allow making the map fullscreen with a click. |
I've added full-screen control so will test automatically modifying the HTML afterwards. Thanks! |
It looks like one feature that is really missing compared to Folium is the ability to save the map to HTML. It seems to be searched the most in the documentation, according the the readthedocs search analytics.
It might be better implemented in ipywidgets directly though. As it might be a common request across widgets libraries. What do you think @maartenbreddels @jasongrout @SylvainCorlay ?
The text was updated successfully, but these errors were encountered: