Hotspot map density - #64
Conversation
Scale hotspot dots by zoom and species count instead of drawing every one at a fixed size, and add a minimum-checklists filter defaulting to hotspots with at least one checklist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| if (count <= 400) return markerColors[8]; | ||
| if (count <= 1000) return markerColors[9]; | ||
| return markerColors[0]; | ||
| return markerColors[9]; |
There was a problem hiding this comment.
Counts >1000 were returning markerColors[0], the same as 0 count.
|
Cool! I kinda like this idea, actually. I'll play around with it a bit, especially on a mobile device to make sure it still works fine. |
|
I definitely don't mind! Though I'll admit, it may take me a a bit to get to some of the PRs as I stay pretty busy with other work, and also travel a fair bit. So even if a PR sits around for a while, it's certainly not forgotten. For mobile testing, I usually set up my computer so I can access localhost via a mobile device. I forget exactly how I did that, but I'm sure Claude can help! I do remember several years ago when I was first building out BirdPlan I had to make the dots slightly larger on mobile to make them easier to click on. |


The hotspot density can get really high in some situations. This PR tries to address this in 2 ways:
I'm not convinced that the scaling is exactly right, but I figured I'd share the concept/rough draft with you rather than tune it to my own taste.
Example zero-checklist hotspot with load error:
Current examples of a pretty dense view (Thailand) and a more moderate one (Arizona):
Thailand with marker size scaling from this PR:
Thailand after applying a hotspot checklist count filter that is only excluding locations with zero checklists:
Arizona with marker size scaling:
A zoomed view of Thailand before and after scaling/filtering. The difference is less significant with greater zoom.

