Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NwinNwin committed Feb 10, 2024
2 parents 858ebb6 + 77c4f1a commit 61ed6ea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/Map/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ export default function Map({
];
const bounds = L.latLngBounds(allowedBounds);

const mapBoundsCoordinates = [
[33.625038, -117.875143],
[33.668298, -117.808742],
];
const mapBounds = L.latLngBounds(mapBoundsCoordinates);

const handleMarkerSelect = async () => {
setShowDonut(true);
await new Promise((resolve) => setTimeout(resolve, 2000));
Expand Down Expand Up @@ -318,8 +324,11 @@ export default function Map({
className="map-container"
center={centerPosition}
zoom={17}
minZoom={15}
zoomControl={false}
attributionControl={false}
maxBounds={mapBounds}
maxBoundsViscosity={1.0}
>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
Expand Down

0 comments on commit 61ed6ea

Please sign in to comment.