Button to center the map on the current location.
This commit is contained in:
1 parent
88755e35f9
commit
46cffdcc4c
8 files changed
+103
-7
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user