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:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user