Skip to content
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

Fix empty geojson failing with style_function #1213

Merged

Conversation

agussman
Copy link
Contributor

@agussman agussman commented Oct 9, 2019

Currently, attempting to plot an empty GeoJson object fails if there's a style_function. This fix checks if there are features first.

Closes #1212

folium/features.py Outdated Show resolved Hide resolved
Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for briging this bug to our attention. Let's fix it indeed. Could you address my comment and fix the CI comment about the indentation? Please also add a test that shows that using empty geojson data with a style function does not fail.

folium/features.py Outdated Show resolved Hide resolved
@Conengmo Conengmo added the waiting for changes This PR has been reviewed and changes are needed before merging label Oct 29, 2019
@Conengmo Conengmo changed the title Fix for #1212 empty geojson failing with style_function Fix empty geojson failing with style_function Nov 10, 2022
Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should do it. Let's merge when the tests pass.

@Conengmo Conengmo added ready PR is ready for merging and removed waiting for changes This PR has been reviewed and changes are needed before merging labels Nov 10, 2022
@Conengmo Conengmo merged commit a0ee76e into python-visualization:main Nov 15, 2022
@Conengmo Conengmo mentioned this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR is ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty geojson data fails when combined with a style_function
3 participants