diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts index 6bf8fc9ce2..9d2481baec 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts @@ -86,8 +86,7 @@ export default abstract class LeafletMap { public initSettings(options: MapSettings) { this.options.tinyColor = tinycolor(this.options.color || defaultSettings.color); - const { disableScrollZooming, - useClusterMarkers, + const { useClusterMarkers, zoomOnClick, showCoverageOnHover, removeOutsideVisibleBounds, @@ -95,9 +94,6 @@ export default abstract class LeafletMap { chunkedLoading, maxClusterRadius, maxZoom }: MapSettings = options; - if (disableScrollZooming) { - this.map.scrollWheelZoom.disable(); - } if (useClusterMarkers) { const clusteringSettings: MarkerClusterGroupOptions = { zoomToBoundsOnClick: zoomOnClick, @@ -307,8 +303,11 @@ export default abstract class LeafletMap { } else { this.bounds = new L.LatLngBounds(null, null); } + if (this.options.disableScrollZooming) { + this.map.scrollWheelZoom.disable(); + } if (this.options.draggableMarker) { - this.addMarkerControl(); + this.addMarkerControl(); } if (this.options.editablePolygon) { this.addPolygonControl();