Skip to content

Can heatmaps maintain a fixed geographic radius regardless of the zoom level? #2128

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

Closed
dhyanKaro opened this issue Apr 8, 2025 · 1 comment

Comments

@dhyanKaro
Copy link

Rather than defining the radius by pixels.

@hansthen
Copy link
Collaborator

hansthen commented Apr 8, 2025

Folium is a simple wrapper around Leaflet and its plugins. As far as I can see, the underlying plugin https://github.com/Leaflet/Leaflet.heat/ does not support what you ask.

One possible workaround you could explore (and it requires a little javascript) is to add an event handler on the "zoomend" event. You could then recalculate radius in pixels based on extent of the map visible. It is tricky however. Geographical circles (on the globe) are not exactly circles on the map projection.

@dhyanKaro dhyanKaro closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2025
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

No branches or pull requests

2 participants