import { LatLng } from 'leaflet'
import { MapContainer } from 'react-leaflet'
import { ContextWrapper } from '#components/AppShell/ContextWrapper'
import { UtopiaMapInner } from './UtopiaMapInner'
import type { GeoJsonObject } from 'geojson'
/**
* This component creates the map.
* ```tsx
*
* ```
* You can define its {@link Layer | `Layers`} as supcomponents.
* ```tsx
*
*
*
*
* ```
* You can also pass {@link Tags | `Tags`} or {@link Permissions | `Permissions`} as subcomponents.
* ```tsx
*
* ...
*
*
*
* ```
* @category Map
*/
function UtopiaMap({
height = '500px',
width = '100%',
center = [50.6, 9.5],
zoom = 10,
children,
geo,
showFilterControl = false,
showGratitudeControl = false,
showLayerControl = true,
showZoomControl = false,
showThemeControl = false,
defaultTheme,
donationWidget,
}: {
/** height of the map (default '500px') */
height?: string
/** width of the map (default '100%') */
width?: string
/** initial centered position of the map (default [50.6, 9.5]) */
center?: [number, number]
/** initial zoom level of the map (default 10) */
zoom?: number
/** React child-components */
children?: React.ReactNode
/** GeoJSON to display on the map */
geo?: GeoJsonObject
/** show the filter control widget (default false) */
showFilterControl?: boolean
/** show the gratitude control widget (default false) */
showLayerControl?: boolean
/** show the layer control widget (default true) */
showGratitudeControl?: boolean
/** show zoom control widget (default false) */
showZoomControl?: boolean
/** show a widget to switch the theme */
showThemeControl?: boolean
/** the defaut theme */
defaultTheme?: string
/** ask to donate to the Utopia Project OpenCollective campaign (default false) */
donationWidget?: boolean
}) {
return (
{children}
)
}
export { UtopiaMap }