diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index 89bf2ce2..08d42861 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -1,4 +1,4 @@ -import { TileLayer, MapContainer, useMapEvents } from "react-leaflet"; +import { TileLayer, MapContainer, useMapEvents, GeoJSON } from "react-leaflet"; import "leaflet/dist/leaflet.css"; import * as React from "react"; import { Geometry, Item, LayerProps, UtopiaMapProps } from "../../types" @@ -20,6 +20,7 @@ import { toast } from "react-toastify"; import { useClusterRef, useSetClusterRef } from "./hooks/useClusterRef"; + export interface MapEventListenerProps { selectNewItemPosition: LayerProps | Item | null, setSelectNewItemPosition: React.Dispatch, @@ -35,7 +36,8 @@ function UtopiaMap({ width = "100%", center = [50.6, 9.5], zoom = 10, - children } + children, + geo} : UtopiaMapProps) { function MapEventListener(props: MapEventListenerProps) { @@ -123,6 +125,7 @@ function UtopiaMap({ ) } + {geo && } diff --git a/src/types.ts b/src/types.ts index c9990edf..d414ebe7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,3 @@ -import { LatLng, LatLngTuple, latLng } from "leaflet"; import { ItemFormPopupProps } from "./Components/Map/Subcomponents/ItemFormPopup"; export interface UtopiaMapProps { @@ -8,6 +7,7 @@ export interface UtopiaMapProps { zoom?: number, tags?: Tag[], children?: React.ReactNode, + geo?: any } export interface LayerProps {