@@ -87,13 +95,21 @@ if ($config['map']['engine'] == 'leaflet') {
$init_lng = $config['leaflet']['default_lng'];
$init_zoom = $config['leaflet']['default_zoom'];
}
+ if (!empty($widget_settings['group_radius'])) {
+ $group_radius = $widget_settings['group_radius'];
+ }
+ else {
+ $group_radius = 80;
+ }
$map_init = "[" . $init_lat . ", " . $init_lng . "], " . sprintf("%01.0f", $init_zoom);
$temp_output .= 'var map = L.map(\'leaflet-map\').setView('.$map_init.');
L.tileLayer(\'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\', {
attribution: \'©
OpenStreetMap contributors\'
}).addTo(map);
-var markers = L.markerClusterGroup();
+var markers = L.markerClusterGroup({
+ maxClusterRadius: ' . $group_radius . ',
+ });
var redMarker = L.AwesomeMarkers.icon({
icon: \'server\',
markerColor: \'red\', prefix: \'fa\', iconColor: \'white\'