|
|
|
@ -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(); |
|
|
|
|