Skip to content

Commit

Permalink
use correct API
Browse files Browse the repository at this point in the history
  • Loading branch information
kamicut committed Jun 7, 2024
1 parent 2d1fba7 commit 98d404a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/web/src/app/reducer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ export const useAppReducer = () => {
if (state.map && state.initialView) {
const { lng, lat, zoom } = state.initialView;
if (lng !== undefined && lat !== undefined && zoom !== undefined) {
state.map.setView([lat, lng], zoom);
state.map.setCenter([lng, lat]);
state.map.setZoom(zoom);
}
}
}, [state.initialView, state.map]);
Expand Down

0 comments on commit 98d404a

Please sign in to comment.