diff --git a/legacy/app/common/services/maps.js b/legacy/app/common/services/maps.js index 0fd7b6cfa8..22b23e1054 100644 --- a/legacy/app/common/services/maps.js +++ b/legacy/app/common/services/maps.js @@ -95,7 +95,8 @@ function Maps(ConfigEndpoint, L, _, CONST) { layers: [L.tileLayer(defaultLayer.url, defaultLayer.layerOptions)], center: [config.default_view.lat, config.default_view.lon], zoom: config.default_view.zoom, - clustering: config.clustering + clustering: config.clustering, + cluster_radius: Number(config.cluster_radius || 50) }); }); } diff --git a/legacy/app/map/post-view-map.directive.js b/legacy/app/map/post-view-map.directive.js index 59b5a22366..325e5cdf80 100644 --- a/legacy/app/map/post-view-map.directive.js +++ b/legacy/app/map/post-view-map.directive.js @@ -85,7 +85,9 @@ function PostViewMap(PostEndpoint, Maps, _, PostFilters, L, $q, $rootScope, $com if (map.options.clustering) { - markers = markers ? markers : L.markerClusterGroup(); + markers = markers ? markers : L.markerClusterGroup({ + maxClusterRadius: map.options.cluster_radius + }); // This has to be done individually. // Using clusterLayer.addLayers() breaks the clustering. // Need to investigate as this should have been fixing in v1.0.0