acdh-oeaw / vicav-vue3

Reimplementation of the VICAV Frontend based on Vue.js 3
https://vicav-vue.acdh-ch-dev.oeaw.ac.at
MIT License
0 stars 0 forks source link

Handle multiple markers at the same location or close to each other on the map #119

Closed MauPalantir closed 4 months ago

MauPalantir commented 4 months ago

TUNOCENT data contains lots of data either on the same location (eg. multiple data types) or very close to each other, so it is hard to navigate through overlapping markers. Existing Leaflet marker overlap management (eg. spiderifier) solutions did not help them as the "spiderified markers" were still hard to manage if other markers were very close to each other, so what we have now on VICAV is a mechanism which replaces the default marker click mechanism for overlapping markers with a popup showing the list of data entries.

So the expected behavior is: When there are markers in the markers dataset which are closer than N pixels on the map The markers sousld be conflated and the first one is shown only on the map When the user clicks on a conflated marker, a popup appears with a structured list of links to the data points The logic should handle map resizes and preferably configurable at least by project (maybe later by view, idk)

simar0at commented 4 months ago

I know the problem also in Wibarab. The solution sounds good for me. I had another idea: If the markers occupy the same spot then move them just a little (however much that is) apart.

I have to admit that I don't know how to implement that (maybe there is a library). So I look forward to see your solution and I hope it also works for Wibarab.

MauPalantir commented 4 months ago

Yes, but that wouldn't solve the problem of multiple data points from the same location. That was also an issue for tunocent.

I checked the existing tunocent solution and there the markers are not moved, just the popup is attached with the nearby data entries. I would just port this in the first place and later we can think about the conflation logic if we feel the need.