+ {item.name}
+ {item.start && item.end &&
+
+
+
+
{new Date(item.start).toISOString().substring(0, 10) || ""}
+
+
+ -
+
+
+
+
{new Date(item.end).toISOString().substring(0, 10) || ""}
+
+
+ }
+
+
+
+
+ {item.tags &&
+ tags.map((tag: Tag) => (
+ #{tag.name}
+ ))
+ }
+
+
+ )
+}
+
+export {Popup};
+
+
diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx
new file mode 100644
index 00000000..1b8660e5
--- /dev/null
+++ b/src/Components/Map/UtopiaMap.tsx
@@ -0,0 +1,92 @@
+import { TileLayer, MapContainer, Marker } from "react-leaflet";
+import "leaflet/dist/leaflet.css";
+import * as React from "react";
+import MarkerIconFactory from '../../Utils/MarkerIconFactory';
+import {Popup} from "./Popup";
+import { Item, Tag } from "../../types"
+import "../../index.css"
+import { LatLng } from "leaflet";
+import MarkerClusterGroup from 'react-leaflet-cluster'
+
+export interface MapProps {
+ height: string,
+ width: string,
+ center: LatLng,
+ zoom: number,
+ places?: Item[],
+ events?: Item[],
+ tags?: Tag[],
+}
+
+const UtopiaMap = (props: MapProps) => {
+ let center: LatLng = new LatLng(50.6, 9.5);
+ if (props.center) center = props.center;
+ let zoom: number = 10;
+ if (props.zoom) zoom = props.zoom;
+ let height: string = "400px";
+ if (props.height) height = props.height;
+ let width: string = "100vw";
+ if (props.width) width = props.width;
+
+ let tagMap = new Map(props.tags?.map(key => [key.id, key]));
+
+ const getTags = (item: Item) => {
+ let tags: Tag[] = [];
+ item.tags && item.tags.forEach(element => {
+ if (tagMap.has(element)) { tags.push(tagMap.get(element)!) };
+ });
+ return tags;
+ }
+
+
+ return (
+