fix: auto-zoom to street level when first GPS point arrives

When the map starts zoomed out (level 5), snap to zoom 16 on the first
real GPS position instead of keeping the overview level.
This commit is contained in:
2026-03-26 10:08:24 +01:00
parent 345d8110ec
commit 6489c643e6
@@ -229,8 +229,8 @@
const ll = [pt.lat, pt.lng];
liveMarker.setLatLng(ll);
liveMarker.setStyle({ opacity: 1, fillOpacity: 1 });
const zoom = liveMap.getZoom() || 16;
liveMap.setView(ll, zoom);
const zoom = liveMap.getZoom();
liveMap.setView(ll, zoom < 14 ? 16 : zoom);
}
});