[frontend]: Add scroll limits on map
This commit is contained in:
@ -96,7 +96,15 @@ const MapComponent = ({ markers, clusteringEnabled }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MapContainer center={mapCentre} zoom={7} minZoom={4} style={{ height: "100%", width: "100%" }}>
|
<MapContainer
|
||||||
|
center={mapCentre}
|
||||||
|
zoom={7}
|
||||||
|
minZoom={4}
|
||||||
|
maxBounds={[[150, -50], [0, 50]]}
|
||||||
|
maxBoundsViscosity={0.3}
|
||||||
|
style={{ height: "100%", width: "100%" }}
|
||||||
|
>
|
||||||
|
|
||||||
<TileLayer
|
<TileLayer
|
||||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
|
Reference in New Issue
Block a user