Skip to content

Commit 0ddc299

Browse files
committed
Add zoom to animation
1 parent c3986a2 commit 0ddc299

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/Animation.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,11 @@ import PlayButton from "@/components/ui/PlayButton";
2020

2121
import { usePausableAnimation } from "@/components/ui/utils";
2222

23+
import { INITIAL_VIEW_STATE } from "./App";
24+
2325
import "maplibre-gl/dist/maplibre-gl.css";
2426
import "./App.css";
2527

26-
const INITIAL_VIEW_STATE = {
27-
latitude: 51.47,
28-
longitude: 0.45,
29-
zoom: 0,
30-
maxZoom: 1,
31-
};
32-
3328
const MAP_STYLE =
3429
"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json";
3530

@@ -153,8 +148,8 @@ function App() {
153148
// maxCacheByteSize: null,
154149
// maxCacheSize: null,
155150
// maxRequests: 6,
156-
// maxZoom: 19,
157-
// minZoom: 0,
151+
maxZoom: zarrReader.maxZoom,
152+
minZoom: zarrReader.minZoom,
158153
// onTileError: null,
159154
// onTileLoad: null,
160155
// onTileUnload: null,

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import CheckBox from "@/components/ui/Checkbox";
1818
import "maplibre-gl/dist/maplibre-gl.css";
1919
import "./App.css";
2020

21-
const INITIAL_VIEW_STATE = {
21+
export const INITIAL_VIEW_STATE = {
2222
latitude: 51.47,
2323
longitude: 0.45,
2424
zoom: 0,

0 commit comments

Comments
 (0)