Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps - Server-side Clustering

I've got about 500 000 markers and naturally I cannot display them all. I've tried MakerClusterer but it was too complex for js to plot clusters on map. I was thinking on server-side clusterer but it was much slower than javascript solution!!!

Do you know any solution of this problem? I know that 500 000 is very huge number but php should be at least as fast as js. That's probably a matter of implementation. Perhaps there is some other solution like this that is known to be efficient?

Thanks

like image 799
Jacek Francuz Avatar asked Mar 20 '26 04:03

Jacek Francuz


2 Answers

You can also have a look at using Fusion Tables http://code.google.com/apis/maps/documentation/javascript/overlays.html#FusionTables

like image 54
skarE Avatar answered Mar 21 '26 18:03

skarE


You want to look for a space-filling-curve or a spatial index (database). A sfc reduce the 2d complexity to a 1d complexity. You want to look for Nick's hilbert curve quadtree spatial index blog. BTW. I've implemented a php class to use a hilbert curve to search for postcodes. It's using a table non-recursive approach and can use all 4 hilbert-curves. You can find my class at phpclasses.org (hilbert-curve).

like image 36
Micromega Avatar answered Mar 21 '26 19:03

Micromega



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!