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

Heatmap improvements #1358

Merged
merged 5 commits into from
Oct 11, 2023
Merged

Heatmap improvements #1358

merged 5 commits into from
Oct 11, 2023

Conversation

yohanboniface
Copy link
Member

A bunch of improvement to make heatmap layers more usable:

Before:

image

After:

image

toPrecision returns an exponential notation for example for:
 const x = 100
 x.toPrecision(2)
Otherwise we store a string
Patch comes from Leaflet/Leaflet.heat#78

We'll remove it when this PR get merged and released.

_redraw: function () {
// Import patch from https://github.com/Leaflet/Leaflet.heat/pull/78
// Remove me when this get merged and released.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm really inclined to rewrite/modernize (for…of, etc) that part together and submitting a patch to the upstream PR but maybe it's intentional on the Leaflet side to keep a bigger set of supported browsers?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's intentional, maybe it's because it's an old patch (7 years old) ?

I'm ok to rewrite it in our side, but not interested to submitting a patch: I think the PR is quite dead now, not even sur the user who submitted is still around and would accept it. Leaflet.heat has no release since a very long time. I'd like to do one (as a Leaflet maintainer I've the merge bit there to), but it may take a bit of time to get there, since I need to coordinate with Mourner, which has other things in mind I think.

So, my recommendation would be to not touch the patch (so not to diverge), but I'm ok if you prefer modernizing it on our side. Then, next step would be to merge that PR upstream and at this point modernize the code. But it's an unconventional situation and I don't really see a clear virtuous way to proceed…

@yohanboniface yohanboniface merged commit dac1f16 into master Oct 11, 2023
@yohanboniface yohanboniface deleted the heat-improvements branch October 11, 2023 20:50
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.

None yet

2 participants