JasonSanford / leaflet-vector-layers

A little help to viewing ArcGIS Server, Geocommons, Arc2Earth, CartoDB, GIS Cloud, etc. vector data in a Leaflet map
http://jasonsanford.github.io/leaflet-vector-layers
BSD 2-Clause "Simplified" License
216 stars 61 forks source link

Support for clusters #24

Open mrg12 opened 11 years ago

mrg12 commented 11 years ago

It would be nice if you support clustering for the features that are being displayed. Maybe use the existing leaflet cluster-marker plugin?

oeon commented 11 years ago

+1, I was trying to use lvector AGS with the marker-cluster plugin - is it possible?

JasonSanford commented 11 years ago

I don't see why it wouldn't be possible. I've not used the marker cluster plugin. But I'd envision it working by looking for a cluster option flag, or option to allow custom clustering, and assuming the marker cluster library is loaded and available.

bmcbride commented 11 years ago

LVL would just have to add the GeoJSON markers to an L.MarkerClusterGroup: https://github.com/Leaflet/Leaflet.markercluster/blob/master/example/geojson.html