Yeetii / peaks-hunters

0 stars 0 forks source link

Limit amount of Peak markers shown #10

Closed Yeetii closed 2 months ago

Yeetii commented 2 years ago

Filter markers shown based on distance to center. Different distances for summited and unsummited peaks.

Different ideas:

Yeetii commented 2 years 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?

Yeetii commented 2 years ago

Waiting for #13

Yeetii commented 1 year ago

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.

Yeetii commented 1 year ago

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.

Yeetii commented 1 year ago

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.

Yeetii commented 1 year ago

Not such a critical issue after swapping markers with circles that use way less resources. The also seem to only be rendered when visible.