Skip to content

Fix broken prefer_canvas option #1133

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

FabeG
Copy link
Contributor

@FabeG FabeG commented Apr 25, 2019

Small correction to fix broken prefer_canvas option (Close #1131):
since leaflet 1.0.0, the preferCanvas option is not part of the GlobalSwitch
options, but has to be passed as an option to L.Map.

Small correction to fix broken prefer_canvas option (Close python-visualization#1131):
since leaflet 1.0.0, the preferCanvas option is not part of the GlobalSwitch
options, but has to be passed as an option to L.Map.
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 making a PR for this! Seems we indeed missed the change on the Leaflet side.

I have one comment, once that's resolved this is good to merge.

@Conengmo Conengmo added the in discussion This PR or issue is being discussed label Apr 30, 2019
@Conengmo
Copy link
Member

Conengmo commented May 1, 2019

This looks good @FabeG, I’ll merge it later this week.

Can I ask, maybe you know, why wouldn’t we always use prefer_canvas? If it increases performance we could set the default to true. Or are there downsides or side effects?

@FabeG
Copy link
Contributor Author

FabeG commented May 2, 2019

Hi @Conengmo, I let the default to false to be in line with leaflet default. It seems there are still some drawbacks using Canvas as a default. See https://leafletjs.com/reference-1.0.0.html#canvas :

Canvas is not available in all web browsers, notably IE8, and overlapping geometries might not display properly in some edge cases

@Conengmo
Copy link
Member

Conengmo commented May 2, 2019

Thanks for looking into this. We'll leave it at default False then.

This is ready IMO, I'll merge it later this week. Thanks for your contribution!

@Conengmo Conengmo added ready PR is ready for merging and removed in discussion This PR or issue is being discussed labels May 2, 2019
@Conengmo Conengmo merged commit 3008b98 into python-visualization:master May 2, 2019
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.

Performance issue when trying to draw lots of markers: prefer_canvas option inefficient
2 participants