1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 13:04:19 +00:00

🔧 Allow adding more components to BoxMap

This commit is contained in:
Steffo 2021-05-18 16:54:44 +02:00
parent cc57f0d66d
commit a4bd1d2ab7
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -4,7 +4,7 @@ import BoxFull from "./BoxFull"
import { MapContainer, TileLayer } from "react-leaflet" import { MapContainer, TileLayer } from "react-leaflet"
export default function BoxMap({ header, setMap, startingPosition, startingZoom, button, ...props }) { export default function BoxMap({ header, setMap, startingPosition, startingZoom, button, children, additions, ...props }) {
return ( return (
<BoxFull <BoxFull
header={header} header={header}
@ -21,6 +21,7 @@ export default function BoxMap({ header, setMap, startingPosition, startingZoom,
attribution='(c) <a href="https://osm.org/copyright">OpenStreetMap contributors</a>' attribution='(c) <a href="https://osm.org/copyright">OpenStreetMap contributors</a>'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/> />
{additions}
<div className={"leaflet-top leaflet-right"}> <div className={"leaflet-top leaflet-right"}>
<div className={"leaflet-control"}> <div className={"leaflet-control"}>
{button} {button}