jsdelivr / www.jsdelivr.com

The official jsDelivr website
https://www.jsdelivr.com
Open Software License 3.0
143 stars 63 forks source link

GP: probes clustering on the map #635

Open MartinKolarik opened 5 months ago

MartinKolarik commented 5 months ago

I noticed the coordinates we're getting from geoip providers are very low quality and tend to put all probes in the area in a single place. E.g. this changes to this when zooming, which is 1 probe on the left, and 17 probes stacked over each other on the right. In some other cases, it results in formations like this.

We have a somewhat related task https://github.com/jsdelivr/globalping/issues/306 (this question is about UI, but it might create new requirements in that task), and I'm wondering what's even the best way of presenting these on the map: a) slightly moving the dots so that each individual probe is visible (similar to the last screenshot), b) forcing the cluster view and always showing a single node with the number, c) something else?

I think B makes the most sense (with 20 dots, you aren't going to click each of them to see the details anyway), and it allows for the most efficient API responses, but it opens the question of what to do about tooltips with network names - do we just not show them for these clusters? Do we show a big tooltip with all network names?

@jimaek @alexey-yarmosh

jimaek commented 5 months ago

I don't want to force the cluster view, I want people to be able to view each individual dot and metadata. So option 1 sounds best

MartinKolarik commented 5 months ago

But does that option really work for what you want? If I see 20 probes in one location, I really won't be clicking each of them. It gets boring very quickly. If we show a single big cluster, we can also show all information combined in a single tooltip, which seems better.

jimaek commented 5 months ago

I personally often use it and zoom all the way to the dots to better understand what is going on and where exactly is probe is. Just having "20 probes in this general direction" is not very nice or precise.

MartinKolarik commented 5 months ago

But we're talking specifically about the case where all probes are in the same location anyway. If the coordinates were different, we would still show them separately.

jimaek commented 5 months ago

How would the tooltip look in that case? There are instances of 20 probes in the same coordinates

MartinKolarik commented 5 months ago

That's up to Robert to figure out but I think it might work. I can ask him for a preview.

MartinKolarik commented 2 weeks ago

We now have this behavior on the new network page. @xbpcb please port the coordinates grouping to the homepage as well.

So on the homepage: