Button to center the map on the current location.

This commit is contained in:
vdv committed 2022-09-20 17:29:02 +02:00
1 parent 88755e35f9
commit 46cffdcc4c
8 files changed
+103 -7

No files matched your search

+5
View File
@@ -168,6 +168,11 @@ const mapSlice = createSlice({
resize: (state) => {
evaluateStateFromScope(state);
},
setCenter: (state, action) => {
state.scope.center.lat = action.payload.lat;
state.scope.center.lon = action.payload.lon;
evaluateStateFromScope(state);
},
shift: (state, action) => {
state.slippy.translation.x =
state.slippy.translation.x + action.payload.x;