From c1c3797eb8a7fd1e91dc4af01c1c99a53573cc85 Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Mon, 12 Sep 2022 17:16:35 +0200 Subject: [PATCH] Improve placement of map controls and popovers (fixes #272) --- frontend/src/components/Map/index.tsx | 9 +++++++-- frontend/src/pages/MapPage/index.tsx | 6 +++--- frontend/src/pages/MapPage/styles.module.less | 5 ++--- frontend/src/pages/TrackPage/TrackPage.module.less | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/Map/index.tsx b/frontend/src/components/Map/index.tsx index fd4440a..0ce11a1 100644 --- a/frontend/src/components/Map/index.tsx +++ b/frontend/src/components/Map/index.tsx @@ -6,6 +6,7 @@ import ReactMapGl, { WebMercatorViewport, ScaleControl, NavigationControl, + AttributionControl, } from "react-map-gl"; import turfBbox from "@turf/bbox"; import { useHistory, useLocation } from "react-router-dom"; @@ -63,12 +64,14 @@ function Map({ children, boundsFromJson, baseMapStyle, + hasToolbar, ...props }: { viewportFromUrl?: boolean; children: React.ReactNode; boundsFromJson: GeoJSON.Geometry; baseMapStyle: string; + hasToolbar?: boolean; }) { const [viewportState, setViewportState] = useState(EMPTY_VIEWPORT); const [viewportUrl, setViewportUrl] = useViewportFromUrl(); @@ -141,12 +144,14 @@ function Map({ {...viewport} {...props} className={classnames(styles.map, props.className)} + attributionControl={false} > - + + {children} diff --git a/frontend/src/pages/MapPage/index.tsx b/frontend/src/pages/MapPage/index.tsx index 07f510d..0c0ce78 100644 --- a/frontend/src/pages/MapPage/index.tsx +++ b/frontend/src/pages/MapPage/index.tsx @@ -211,12 +211,12 @@ function MapPage({ login }) { )}
- +