diff --git a/ui/package.json b/ui/package.json
index b9af80ab..1d38aa04 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -23,7 +23,7 @@
"i18next-browser-languagedetector": "^8.0.0",
"lodash": "^4.17.21",
"mapbox-gl-style-switcher": "^1.0.11",
- "maplibre-gl": "^2.4.0",
+ "maplibre-gl": "4.5.2",
"react": "^18.3.1",
"react-autocomplete-hint": "^2.0.0",
"react-color": "^2.19.3",
@@ -70,7 +70,6 @@
"@types/hat": "^0.0.4",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.7",
- "@types/mapbox-gl": "^2.7.21",
"@types/mapbox__mapbox-gl-draw": "~1.4.6",
"@types/node": "^20.16.1",
"@types/react": "^18.3.4",
diff --git a/ui/src/App.scss b/ui/src/App.scss
index c2bf3aaa..2778dbf2 100644
--- a/ui/src/App.scss
+++ b/ui/src/App.scss
@@ -13,8 +13,7 @@ $grey-lighter: hsl(221, 14%, 86%);
$grey-lightest: hsl(221, 14%, 93%);
// Override global Sass variables from the /utilities folder
-@use "bulma/sass/utilities" with (
- $family-primary: '"B612",sans-serif',
+@use "bulma/sass/utilities" with ($family-primary: '"B612",sans-serif',
$family-monospace: '"B612 Mono", monospace',
$primary: $orange,
$warning: $yellow,
@@ -32,8 +31,7 @@ $grey-lightest: hsl(221, 14%, 93%);
$grey: $grey,
$grey-light: $grey-light,
$grey-lighter: $grey-lighter,
- $grey-lightest: $grey-lightest
-);
+ $grey-lightest: $grey-lightest);
// Import the components we need
@forward "bulma/sass/base";
@@ -43,20 +41,12 @@ $grey-lightest: hsl(221, 14%, 93%);
@forward "bulma/sass/components/breadcrumb";
@forward "bulma/sass/components/card";
@forward "bulma/sass/components/dropdown";
-@use "bulma/sass/components/message" with (
- $message-body-padding: 1em 1.5em 0em 1em
-);
-@use "bulma/sass/components/modal" with (
- $modal-content-width: 80rem
-);
-@use "bulma/sass/components/navbar" with (
- $navbar-height: $navbar-height
-);
+@use "bulma/sass/components/message" with ($message-body-padding: 1em 1.5em 0em 1em);
+@use "bulma/sass/components/modal" with ($modal-content-width: 80rem);
+@use "bulma/sass/components/navbar" with ($navbar-height: $navbar-height);
@forward "bulma/sass/components/tabs";
-@use "bulma/sass/form" with (
- $input-shadow: none
-);
+@use "bulma/sass/form" with ($input-shadow: none);
// Import the bulma elements we need
@forward "bulma/sass/elements/box";
@@ -69,9 +59,7 @@ $grey-lightest: hsl(221, 14%, 93%);
@forward "bulma/sass/elements/tag";
@forward "bulma/sass/elements/title";
-@use "bulma/sass/layout/footer" with (
- $footer-padding: 2rem 1.5rem 2rem
-);
+@use "bulma/sass/layout/footer" with ($footer-padding: 2rem 1.5rem 2rem);
@forward "bulma/sass/layout/hero";
@forward "bulma/sass/layout/section";
@forward "bulma/sass/layout/level";
@@ -84,6 +72,8 @@ $grey-lightest: hsl(221, 14%, 93%);
@import url("assets/b612-mono/b612-mono.css");
@import url("assets/b612/b612.css");
+@import "maplibre-gl/dist/maplibre-gl";
+
// Other customizations
section {
&.is-fullheight-with-navbar {
@@ -123,8 +113,7 @@ section {
}
.tbody {
- tr {
- }
+ tr {}
}
}
@@ -142,10 +131,23 @@ section {
border-color: $red;
}
-.mapboxgl-map {
+.maplibregl-map {
min-height: 79vh;
}
+.maplibregl-ctrl-bottom-right .maplibregl-ctrl {
+ float: right;
+ margin: 0 10px px 30px 0;
+}
+
+.mapboxgl-ctrl-group {
+ @extend .maplibregl-ctrl-group !optional;
+}
+
+.mapboxgl-ctrl {
+ @extend .maplibregl-ctrl !optional;
+}
+
@media screen {
.is-print {
display: none !important;
@@ -218,4 +220,4 @@ section {
font-size: 11px;
}
}
-}
+}
\ No newline at end of file
diff --git a/ui/src/views/map/Map.tsx b/ui/src/views/map/Map.tsx
index 0a29a4a4..38ef971f 100644
--- a/ui/src/views/map/Map.tsx
+++ b/ui/src/views/map/Map.tsx
@@ -1,6 +1,5 @@
import './control-panel.css';
-import 'maplibre-gl/dist/maplibre-gl.css';
import "@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css";
import { AddFeatureToLayer, DeleteFeature, GetLayers, ModifyFeature } from './graphql';
import { AddFeatureVars, DeleteFeatureVars, GetLayersData, GetLayersVars, Layer, ModifyFeatureVars } from 'types/layer';
@@ -10,7 +9,7 @@ import { CleanFeature, FilterActiveFeatures, LayerToFeatureCollection } from './
import { displayStyle, drawStyle } from './style';
import { Feature, Geometry, GeoJsonProperties, FeatureCollection } from "geojson";
import { first } from 'lodash';
-import { FullscreenControl, Map, MapProvider, MapRef, NavigationControl, ScaleControl, Source, useMap, Layer as MapLayer } from 'react-map-gl/maplibre';
+import { FullscreenControl, Map, MapProvider, MapRef, NavigationControl, ScaleControl, Source, useMap, Layer as MapLayer, AttributionControl } from 'react-map-gl/maplibre';
import { LayerContext, LayersProvider } from './LayerContext';
import { StyleController, selectedStyle } from './controls/StyleController';
import { memo, useCallback, useContext, useEffect, useRef, useState } from 'react';
@@ -64,26 +63,29 @@ function MapView() {
return (
<>
Lage
-
+
@@ -99,7 +101,10 @@ function Layers() {
return (
-
+
+
+
+
{/* Active Layer */}
diff --git a/ui/src/views/map/controls/BabsIconController.scss b/ui/src/views/map/controls/BabsIconController.scss
index f8beafee..8830de0b 100644
--- a/ui/src/views/map/controls/BabsIconController.scss
+++ b/ui/src/views/map/controls/BabsIconController.scss
@@ -1,4 +1,3 @@
-.mapboxgl-ctrl-group,
.maplibregl-ctrl-group {
button {
width: 35px;
diff --git a/ui/src/views/map/controls/BabsIconController.tsx b/ui/src/views/map/controls/BabsIconController.tsx
index 88c5057b..f9c91f03 100644
--- a/ui/src/views/map/controls/BabsIconController.tsx
+++ b/ui/src/views/map/controls/BabsIconController.tsx
@@ -73,7 +73,7 @@ function IconController(props: BabsIconControllerProps) {
}
return (
-
+
{Object.keys(IconGroups).map((group) =>
)}