Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526import {MapContainer, TileLayer} from "react-leaflet";import {map} from "../../config/map";import L from 'leaflet';import icon from 'leaflet/dist/images/marker-icon.png';import iconShadow from 'leaflet/dist/images/marker-shadow.png';
export function OpenStreetMap({children}) { let DefaultIcon = L.icon({ iconUrl: icon, shadowUrl: iconShadow });
L.Marker.prototype.options.icon = DefaultIcon;
return ( <MapContainer center={map.initial.position} zoom={13} scrollWheelZoom={false}> <TileLayer attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" />
{children} </MapContainer>
)}