Skip to content

Commit

Permalink
[#49] Set maxZoom in LeafletProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
ifirmawan committed Nov 18, 2024
1 parent e36394d commit 4844d3e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/context/LeafletProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ export const LeafletProvider = forwardRef(

useEffect(() => {
if (!mapRef.current) {
const map = L.map(mapContainer.current, { center: [0, 0], zoom: 2 });
const map = L.map(mapContainer.current, {
center: [0, 0],
zoom: 2,
maxZoom: 19,
_layersMaxZoom: 19
});

mapRef.current = map;
}

Expand Down

0 comments on commit 4844d3e

Please sign in to comment.