diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index 4b791e84..9be28436 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -22,7 +22,7 @@ export interface MapEventListenerProps { function MapEventListener(props: MapEventListenerProps) { useMapEvents({ click: (e) => { - console.log(e); + console.log(e.latlng.lat + ',' + e.latlng.lng); if (props.selectMode != null) { props.setNewItemPopup({ layer: props.selectMode, position: e.latlng }) @@ -47,40 +47,40 @@ function UtopiaMap({ return ( - - - -
- - - - { - React.Children.toArray(children).map((child) => - React.isValidElement<{ setNewItemPopup: React.Dispatch> }>(child) ? React.cloneElement(child, { setNewItemPopup: setNewItemPopup }) : child - ) - } - - - {newItemPopup && - + + + +
+ + + + { + React.Children.toArray(children).map((child) => + React.isValidElement<{ setNewItemPopup: React.Dispatch> }>(child) ? React.cloneElement(child, { setNewItemPopup: setNewItemPopup }) : child + ) } - - - {selectMode != null && -
-
-
- Select {selectMode.name} position! -
+ + + {newItemPopup && + + } + + + {selectMode != null && +
+
+
+ Select {selectMode.name} position!
- } -
- - - +
+ } +
+ + + ); }