Skip to content

Commit fdabcb4

Browse files
committed
zoom out enough
1 parent 1773366 commit fdabcb4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/MapPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ export function MapPage() {
2828

2929
useEffect(() => {
3030
if (!containerRef.current) return;
31-
const map = L.map(containerRef.current, { crs: L.CRS.Simple, minZoom: -2 });
31+
const map = L.map(containerRef.current, { crs: L.CRS.Simple, minZoom: -3 });
3232
const bounds: L.LatLngBoundsExpression = [
3333
[0, 0],
3434
[imgHeight, imgWidth],
3535
];
3636
L.imageOverlay(Komabamap, bounds).addTo(map);
37-
map.fitBounds(bounds);
37+
map.setView([imgHeight / 2, imgWidth / 2], -1);
3838
mapRef.current = map;
3939

4040
// デバッグ用: 環境変数で現在地を固定座標に設定可能

0 commit comments

Comments
 (0)