-
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
Issue 1943 allow jscode in options #2029
Issue 1943 allow jscode in options #2029
Conversation
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.
Boring but big 😄 Kudos for taking this on. It looks good! I have two small comments, plus some suggestions to remove added print statements from tests. Other than that looks good!
Co-authored-by: Frank Anema <[email protected]>
Co-authored-by: Frank Anema <[email protected]>
Co-authored-by: Frank Anema <[email protected]>
Co-authored-by: Frank Anema <[email protected]>
Co-authored-by: Frank Anema <[email protected]>
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.
Let's go! 🚀
@Conengmo Perhaps you can also have a look at the |
Yes, I noticed that one as well. Can't think of a good, simple solution right now, so maybe what you did is best for now. |
Boring but big. The leaflet class hierarchy allows all classes to have optional arguments. These optional arguments can contain JavaScript code or references to other Leaflet elements.
To support this in Folium I replaced (almost) all instances of
parse_options
in the constructors withthis.options | tojavascript
in the templates. I left theparse_options
in case someone outside of Folium uses it.