changed custom position field

This commit is contained in:
Anton Tranelis 2024-02-01 13:40:11 +01:00
parent d8832ed8da
commit 5de37323d4
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ const mapDivRef = React.createRef();
function UtopiaMap({
height = "500px",
width = "100%",
center = new LatLng(50.6, 9.5),
center = [50.6, 9.5],
zoom = 10,
children }
: UtopiaMapProps) {
@ -79,7 +79,7 @@ function UtopiaMap({
<ItemsProvider initialItems={[]}>
<LeafletRefsProvider initialLeafletRefs={{}}>
<div className={(selectNewItemPosition != null ? "crosshair-cursor-enabled" : undefined)}>
<MapContainer ref={mapDivRef} style={{ height: height, width: width }} center={center} zoom={zoom} zoomControl={false}>
<MapContainer ref={mapDivRef} style={{ height: height, width: width }} center={new LatLng(center[0],center[1])} zoom={zoom} zoomControl={false}>
<Control position='topLeft' zIndex="1000">
<SearchControl clusterRef={clusterRef} />
<TagsControl />

View File

@ -4,7 +4,7 @@ import { ItemFormPopupProps } from "./Components/Map/Subcomponents/ItemFormPopup
export interface UtopiaMapProps {
height?: string,
width?: string,
center?: LatLng,
center?: [number,number],
zoom?: number,
tags?: Tag[],
children?: React.ReactNode,