Browse Source

fix: change map initial bound to 'on load'

pull/153/head
Kette N. Krad 2 years ago
parent
commit
4b5557de35
  1. 9
      src/pages/Map.tsx

9
src/pages/Map.tsx

@ -73,9 +73,9 @@ export const MapPage = (): JSX.Element => {
}, [map]); }, [map]);
useEffect(() => { useEffect(() => {
if (map) { map?.on("load", () => {
getBBox(); getBBox();
} });
}, [map, getBBox]); }, [map, getBBox]);
return ( return (
@ -131,9 +131,8 @@ export const MapPage = (): JSX.Element => {
dragRotate={false} dragRotate={false}
touchZoomRotate={false} touchZoomRotate={false}
initialViewState={{ initialViewState={{
zoom: 10, latitude: 50,
latitude: -38, longitude: 0,
longitude: 145,
}} }}
> >
{waypoints.map((wp) => ( {waypoints.map((wp) => (

Loading…
Cancel
Save