Skip to content

rendering draw and edit options to json #1175

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

Merged

Conversation

mccarthyryanc
Copy link
Contributor

I wanted the ability to remove some the drawing methods from the Draw Toolbar. This could only be done if given a false value, which requires to options to be converted to json. Here is an example:

import folium
from folium.plugins import Draw
m = folium.Map()
Draw(
    draw_options={
        'polyline':False,
        'polygon':False,
        'circle':False,
        'marker':False,
        'circlemarker':False,
    }
).add_to(m)
m.save('testing.html')

image

@Conengmo
Copy link
Member

Does this mean the draw options is currently broken?

@mccarthyryanc
Copy link
Contributor Author

@Conengmo , I think so.

@Conengmo Conengmo merged commit 0896151 into python-visualization:master Jul 21, 2019
@Conengmo
Copy link
Member

Thanks for spotting this and making a PR @mccarthyryanc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants