Skip to content

Commit

Permalink
feat: limit map boundaries and disable wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiaslobo committed Sep 8, 2024
1 parent 3f6b174 commit 30366ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/Map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ export default function Map({ pins, setMapRef }: Props) {
zoomControl={false}
attributionControl={true}
maxZoom={18}
minZoom={3}
maxBounds={[
[90, -180],
[-90, 180]
]}
maxBoundsViscosity={1}
>
<Ref></Ref>
<LayersControl position="topright">
Expand Down
1 change: 1 addition & 0 deletions components/TileController/TileController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const TileController = ({ id, url, name }: ITyle) => {
changeTheme(id);
}
}}
noWrap={true}
/>
</LayersControl.BaseLayer>
);
Expand Down

0 comments on commit 30366ae

Please sign in to comment.