Skip to content

Commit

Permalink
Zoom to bounds on map projects
Browse files Browse the repository at this point in the history
  • Loading branch information
wcedmisten committed Apr 2, 2024
1 parent 1feaa85 commit cbd60df
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pages/project/north-america-hospital-distance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ const Map = () => {
if (error) throw error;
map.current?.addImage('hospitalMarker', image);
})

map.current.fitBounds([
[
-127.66160226468281,
15.666577841851748
], // southwestern corner of the bounds
[
-61.00992217769965,
52.83448773865328
], // northeastern corner of the bounds
]);
});

return (
Expand Down
11 changes: 11 additions & 0 deletions pages/project/virginia-hospital-distance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ const Map = () => {
if (error) throw error;
map.current?.addImage('hospitalMarker', image);
})

map.current.fitBounds([
[
-83.79043169282795,
36.53531313954011
], // southwestern corner of the bounds
[
-74.96413368319128,
39.511129595313434
], // northeastern corner of the bounds
]);
});

return (
Expand Down

0 comments on commit cbd60df

Please sign in to comment.