SaulBurgos / easyLocator

Jquery plugin that load locations on google maps, using a google spreadsheet.
18 stars 7 forks source link

Load many locations #3

Closed kamov closed 7 years ago

kamov commented 7 years ago

Hi, How you handle many locations on the map? It's possible to load locations only of map active, and when user drag map, then locations is re-populate? Thanks

SaulBurgos commented 7 years ago

the plugin has a option called "useMarkerCluster" if is true, the plugin will use this library:

https://github.com/googlemaps/js-marker-clusterer

is a client library to handle with lots of markers on map. the library does a great job. here and example

https://googlemaps.github.io/js-marker-clusterer/examples/speed_test_example.html

kamov commented 7 years ago

Thanks for your reply. Yes I know about cluster. But as I know also cluster mode load all locations.

I see certain other sites which display a map with a lot of locations (10k or 100k or even more). They just display locations of active map, and when user drag, they re-populate map with new locations.

SaulBurgos commented 7 years ago

aaah yes, that is server side cluster. the plugin does not work in that way only client cluster.

This article explain everything with php just convert it to the language that you are using...

https://appelsiini.net/2008/introduction-to-marker-clustering-with-google-maps/

or you can buy the solution

https://codecanyon.net/item/google-map-server-side-markers-clustering-v21/8998709

kamov commented 7 years ago

WOW, thanks a lot! I was searching for this, but really I can't find anything also in google docs.