-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Popup update ; with examples #294
Conversation
|
||
Parameters | ||
---------- | ||
html : str, default None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe Sphinx will complain about this indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
I am 👍, even though the extra complexity worries me a little bit. (But I did like the map-on-map example 😉) @themiurgo Can you review and merge this one? If not ping it back to me. |
If @themiurgo cannot take a look at this until tomorrow morning I will review it. (Not the timezones we all are. @BibMartin seems to be in a never-ending "morning sprint" due to the number of PRs ;-) |
I'm ready to merge, squash away first. |
Squashed.
Sorry, no PR today ; I'm travelling 😉 |
Enjoy your travels and |
Congrats and enjoy your trip! 🎉 |
Thanks ! 🚆 |
@BibMartin How does one get the popup to run the code in the html popup? In the Fancy HTML popup example you linked to, |
There are two possible understanding of your question, because folium/branca rely on a python backend that generates a javascript frontent.
from numpy import *
html="""
<h1> This is a big popup</h1><br>
With a few lines of code...
<p>
<code>
from numpy import *<br>
{}
</code>
</p>
""".format(exp(-2*pi))
... You shall have a look at
|
@BibMartin Sorry for the confusion and thanks for the reply. I'm trying to add row values from a Example:
This produces I found an alternative approach by alexkp here, which adjusted to my example becomes:
This option doesn't throw an error, but also doesn't display the map (I'm unable to find out why). As a reference, doing this with R's Leaflet interface works as follows:
|
I'm not sure this effectively addresses #288, but it's a step in the direction of better popups.
See http://nbviewer.ipython.org/github/bibmartin/folium/blob/issue288/examples/Popups.ipynb for example notebook.