Closed Yeetii closed 2 months ago
Can't get event on zoom in the blazer leaflet wrapper I'm using. Maybe a hybrid solution where I attach that event to the underlying leaflet JS is possible but seems unlikely. Would probably have to switch everything leaflet related to JS.
Maybe best to leave event on zoom for now, continue in blazor and make the transition later if other problems arise?
Waiting for #13
Start with the events already implemented, just show set amount of markers closest to center. Two different limits for summited peaks and unsummited might work well, greater need to see faraway summited peaks.
Finding exact number of closest peaks seems to be more complicated to implement as well as more computationally heavy than a rectangle query. And if we get zoom event as well as screen bounding box to work a query based on rectangle is more useful anyways.
Using k-d tree with a query based on rectangle. Can be used to build an efficient nearest neighbor search https://kanoki.org/2020/08/05/find-nearest-neighbor-using-kd-tree/, there is a ready implementation for finding the one closest neighbor but I want many.
Not such a critical issue after swapping markers with circles that use way less resources. The also seem to only be rendered when visible.
Filter markers shown based on distance to center. Different distances for summited and unsummited peaks.
Different ideas: