From 045ad26565e0679f181b8397e1f9cfc1a9497bb3 Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 8 Jul 2024 06:51:30 +0200 Subject: [PATCH] =?UTF-8?q?plusRoundIcon=20in=20eine=20separate=20Datei=20?= =?UTF-8?q?auslagern=20und=20dann=20in=20MapComponent=20importieren,=20um?= =?UTF-8?q?=20eine=20bessere=20Struktur=20zu=20gew=C3=A4hrleisten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/MapComponent.js | 10 +--------- components/PlusRoundIcon.js | 8 ++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 components/PlusRoundIcon.js diff --git a/components/MapComponent.js b/components/MapComponent.js index 16501840d..7303ee5d2 100644 --- a/components/MapComponent.js +++ b/components/MapComponent.js @@ -38,16 +38,8 @@ import { mapIdState, userIdState } from "../store/atoms/urlParameterState"; import { set } from "lodash"; import { poiLayerVisibleState } from "../store/atoms/poiLayerVisible"; import { data } from "autoprefixer"; +import plusRoundIcon from "./PlusRoundIcon.js"; -//import { createRoot } from "react-dom/client"; - -const plusRoundIcon = L.icon({ - //iconUrl: "/img/plus_round.png", // Update with your actual path - iconUrl: "/img/plus_round.png", // Update with your actual path - iconSize: [22, 22], - iconAnchor: [25, 55], - className: "absolute top-0 left-0 z-10", // Adjust with Tailwind CSS classes -}); //--------------------------------------------------------------------- //-------------------- MapComponent ----------------------------------- const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { diff --git a/components/PlusRoundIcon.js b/components/PlusRoundIcon.js new file mode 100644 index 000000000..d0f1c31db --- /dev/null +++ b/components/PlusRoundIcon.js @@ -0,0 +1,8 @@ +const plusRoundIcon = L.icon({ + //iconUrl: "/img/plus_round.png", // Update with your actual path + iconUrl: "/img/plus_round.png", // Update with your actual path + iconSize: [22, 22], + iconAnchor: [25, 55], + className: "absolute top-0 left-0 z-10", // Adjust with Tailwind CSS classes +}); +export default plusRoundIcon;