This repository has been archived by the owner on Sep 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Clustering GeoJson Points #30
Labels
Comments
From @mathiasmuller4sh on July 10, 2014 15:10 Hi, I've made a little hack in the index.html and it seems to do the tricks. EDIT: Now, need to add a listener to remove cluster on geojson layer remove <script src="lib/js/leaflet/dist/leaflet.js" type="text/javascript"></script>
<script src="lib/js/leaflet.markercluster/dist/leaflet.markercluster.js" type="text/javascript"></script>
<script>
L.GeoJSON = L.GeoJSON.extend({
addTo: function(map) {
var markers = new L.MarkerClusterGroup({
spiderfyOnMaxZoom: false,
showCoverageOnHover: false,
zoomToBoundsOnClick: false,
disableClusteringAtZoom: 19
});
map.addLayer(markers);
markers.addLayer(this);
return this;
}
});
L.geoJson = function (geojson, options) {
return new L.GeoJSON(geojson, options);
};
</script> |
From @mathiasmuller4sh on July 11, 2014 10:28 Complete hack with remove listener.
|
From @stefan2k on October 27, 2014 13:33 Nice workaround! |
From @briankostar on May 14, 2015 21:16 this saved me some time! thanks |
👍 |
Someone want to work on flushing this out into the geojson directive? |
From @briankostar on May 14, 2015 21:36 I'm still learning, but I'll take a crack at it this weekend. |
From @mahmoudmy on June 17, 2015 15:1 Very useful, thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From @vipervf1 on July 7, 2014 19:51
Is there an easy way to use the clustering plugin when using geojson points instead of markers?
Copied from original issue: tombatossals/angular-leaflet-directive#415
The text was updated successfully, but these errors were encountered: