From 06252fb0b54937a3b312bd8cc8eda03ff3d1a0cd Mon Sep 17 00:00:00 2001 From: Anton Tranelis <31516529+antontranelis@users.noreply.github.com> Date: Thu, 22 May 2025 12:06:30 +0200 Subject: [PATCH] refactor(source): zoom control (#221) * 3.0.82 * version number * 3.0.84 * 3.0.85 * 3.0.86 * optional zoom control --- src/Components/Map/UtopiaMap.tsx | 5 +++- src/assets/css/leaflet.css | 43 ++++++++++++++++++++++++++++++-- src/types/UtopiaMapProps.d.ts | 1 + 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index d6832cff..19f81152 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -51,6 +51,7 @@ function UtopiaMap({ showFilterControl = false, showGratitudeControl = false, showLayerControl = true, + showZoomControl = false, showThemeControl = false, defaultTheme, donationWidget, @@ -73,6 +74,8 @@ function UtopiaMap({ showLayerControl?: boolean /** show the layer control widget (default true) */ showGratitudeControl?: boolean + /** show zoom control widget (default false) */ + showZoomControl?: boolean /** show a widget to switch the theme */ showThemeControl?: boolean /** the defaut theme */ @@ -86,7 +89,7 @@ function UtopiaMap({ style={{ height, width }} center={new LatLng(center[0], center[1])} zoom={zoom} - zoomControl={false} + zoomControl={showZoomControl} maxZoom={19} >