Ribbit-Network / ribbit-network-dashboard

The web dashboard for the world's largest crowdsourced network of open-source, low-cost, CO2 Gas Detection Sensors.
MIT License
17 stars 16 forks source link

Display Sensor Aggregate Numbers if Multiple Sensors Are in One Location #39

Closed keenanjohnson closed 2 years ago

keenanjohnson commented 3 years ago

Given that the sensors obfuscate their GPS location, it's possible to have multiple sensors display in the same location on the map. If this happens, we should display a number of sensors on top of that dot to indicate the number of sensors deployed there.

brianstrauch commented 3 years ago

I think we should generalize this to any zoom level. For instance, when the map is zoomed all the way out, it looks like there's only one sensor in Seattle. We should combine sensors whenever they're visually on top of each other, not just at the same coordinates.

keenanjohnson commented 3 years ago

Yes that's a great suggestion!

sagunn commented 3 years ago

I cannot find support for point clustering like this in Plotly's scattermapbox. Discussion here: https://community.plotly.com/t/how-to-use-mapbox-clusters/10774

Looks like maybe using dash-leaflet to render the map could do the trick. See http://dash-leaflet.herokuapp.com/#marker_cluster

keenanjohnson commented 3 years ago

Thanks for looking into that @sagunn ! Perhaps we should trick switching to that map rendering! It looks promising and to be honest, it seems like they are using the same mapbox tiles anyway haha