maps: use data-disable-clustering-at-zoom if present (#42570)
This commit is contained in:
parent
af97ab9ec8
commit
e60da7345a
|
@ -106,9 +106,16 @@ $(function() {
|
|||
map_options.gestureHandling = true;
|
||||
var map = L.map($map_widget[0], map_options);
|
||||
if ($map_widget.data('group-markers')) {
|
||||
var disable_clustering_at_zoom = $map_widget.data('disable-clustering-at-zoom');
|
||||
if (disable_clustering_at_zoom) {
|
||||
disable_clustering_at_zoom = parseInt(disable_clustering_at_zoom);
|
||||
} else {
|
||||
disable_clustering_at_zoom = null;
|
||||
}
|
||||
map.clustered_markers = L.markerClusterGroup({
|
||||
showCoverageOnHover: false,
|
||||
zoomToBoundsOnClick: true,
|
||||
disableClusteringAtZoom: disable_clustering_at_zoom,
|
||||
removeOutsideVisibleBounds: true,
|
||||
iconCreateFunction: function (cluster) {
|
||||
var icon_size = 60;
|
||||
|
|
Loading…
Reference in New Issue