From 34bc15cfa937e3e6dd17d4c6ed8d9a94bf409554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 24 Feb 2026 22:27:52 +0400 Subject: [PATCH] Only zoom out, not in, when fitting ways/relations --- app/components/map.gjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/map.gjs b/app/components/map.gjs index d431bdd..d5fff05 100644 --- a/app/components/map.gjs +++ b/app/components/map.gjs @@ -524,11 +524,13 @@ export default class MapComponent extends Component { padding[1] = visibleWidth * 0.15; } + const currentZoom = view.getZoom(); + view.fit(extent, { padding: padding, duration: 1000, easing: (t) => t * (2 - t), - maxZoom: 19, + maxZoom: currentZoom, }); }