boulderalf / BeeSafeEarth

Code in support of data and maps at http://beesafeboulder.com/
MIT License
1 stars 1 forks source link

Decide on how to render tens of thousands of locations on map #4

Open boulderalf opened 8 years ago

boulderalf commented 8 years ago

We will hopefully have tens of thousands of pledged locations in our system. How do we show those on the map when a user is zoomed out to view an entire continent? Having 10's of thousands of points in the Google Maps API can have serious performance implications.

Let's use this issue to track ideas for scalable rendering of lots of points.

cc @ZebGirouard

boulderalf commented 8 years ago

https://developers.google.com/maps/articles/toomanymarkers#introduction

I think we will need some kind of server-based clustering algorithm. Any other ideas?

boulderalf commented 8 years ago

@ZebGirouard it looks like your Hello World example with Fusion Tables can easily solve our "render thousands of icons on one map" challenge.

cc @DaveLaskarzewski @autumnmartin

ZebGirouard commented 8 years ago

@boulderalf , my second KML Hello World example has a hidden "benefit" of having its KML file (aka the points with their styles) cached on Google's servers. So we wouldn't be doing any of the heavy lifting on map load.

A seemingly solid plan would be to have our pledge captains in various locations have their own sheets (or SQL tables, etc). Then we script a sanitization (just lat and long) and conversion to KML for ALL locations as well as a high-level KML with just the geographical center of all "captained locations" (Boulder, Boston, Portland, etc). We could then switch the KML layer depending on our zoom level with an event listener. The cool thing about KML is that it only loads the points in view...see this link here.