From 64ec03e31e656007212583425d2850601dfa1e12 Mon Sep 17 00:00:00 2001 From: Luke McFarlane Date: Tue, 13 Aug 2024 12:00:44 +1000 Subject: [PATCH 1/2] Added zoom buttons to map component, updated styling Signed-off-by: Luke McFarlane --- app/src/gui/fields/maps/MapWrapper.tsx | 3 ++- app/src/index.css | 28 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/app/src/gui/fields/maps/MapWrapper.tsx b/app/src/gui/fields/maps/MapWrapper.tsx index 58a8a782a..e08ca7747 100644 --- a/app/src/gui/fields/maps/MapWrapper.tsx +++ b/app/src/gui/fields/maps/MapWrapper.tsx @@ -36,6 +36,7 @@ import {register} from 'ol/proj/proj4'; import Button, {ButtonProps} from '@mui/material/Button'; import CloseIcon from '@mui/icons-material/Close'; import GeoJSON from 'ol/format/GeoJSON'; +import Zoom from 'ol/control/Zoom'; // define some EPSG codes - these are for two sample images // TODO: we need to have a better way to include a useful set or allow @@ -131,7 +132,7 @@ function MapWrapper(props: MapProps) { target: element, layers: [tileLayer], view: view, - controls: [], + controls: [new Zoom()], }); theMap.getView().setCenter(center); diff --git a/app/src/index.css b/app/src/index.css index ec2585e8c..feb591879 100644 --- a/app/src/index.css +++ b/app/src/index.css @@ -11,3 +11,31 @@ code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } + +.ol-zoom { + position: absolute; + right: 12px; + bottom: 12px; + background-color: white; + border-radius: 6px; + display: flex; + flex-direction: column; + gap: 12px; + padding: 12px; +} + +.ol-zoom-in { + font-size: 24px; + background-color: rgb(23 23 23); + color: white; + font-weight: bold; + border-radius: 6px; +} + +.ol-zoom-out { + font-size: 24px; + background-color: rgb(23 23 23); + color: white; + font-weight: bold; + border-radius: 6px; +} \ No newline at end of file From c1da328fe9817cf2d699c9e8f0a95ac56bdbf8ee Mon Sep 17 00:00:00 2001 From: Peter Baker Date: Wed, 14 Aug 2024 10:04:25 +1000 Subject: [PATCH 2/2] Improving git ignore to not include dist/bak generated during readme setup Signed-off-by: Peter Baker --- api/.gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/.gitignore b/api/.gitignore index 85abb98ea..2f9f432cf 100644 --- a/api/.gitignore +++ b/api/.gitignore @@ -120,4 +120,7 @@ local_auth/ local_state/ projects_dummy_listing/ keys -couchdb/*.ini \ No newline at end of file +couchdb/*.ini + +couchdb/local.ini* +!couchdb/local.ini.dist \ No newline at end of file