v0.70.0: default map view — world at [0,0] zoom 2, minZoom 0
CI / build + unit + e2e (pull_request) Failing after 15m5s
CI / build + unit + e2e (pull_request) Failing after 15m5s
This commit is contained in:
+7
-4
@@ -12,11 +12,14 @@ import { hoverRouteGeoJson, hoverTraceGeoJson, planesGeoJson, queuedRoutesGeoJso
|
||||
import { weatherFor } from '../lib/weather';
|
||||
import { approxLocalTime } from '../lib/localTime';
|
||||
|
||||
const EUROPE_CENTER: [number, number] = [10, 52];
|
||||
const INITIAL_ZOOM = 4;
|
||||
// v0.70.0 default view: null island [0,0] at zoom 2 — the world is 2048 px wide there and the
|
||||
// Africa+Europe bounding box (lat −35..+71, lon −18..+52) spans ~800 px vertically in Web Mercator,
|
||||
// so both continents are fully visible on a typical desktop map pane.
|
||||
const WORLD_CENTER: [number, number] = [0, 0];
|
||||
const INITIAL_ZOOM = 2;
|
||||
// Flat 2D view only. Max zoom ≈ ~100 km across a typical desktop viewport width at
|
||||
// European latitudes (~47 m/px at z11, 52°N); street-level zoom has no gameplay value.
|
||||
export const MIN_ZOOM = 3;
|
||||
export const MIN_ZOOM = 0; // v0.70.0: fully zoomed out the whole earth (512 px world) fits any viewport
|
||||
export const MAX_ZOOM = 11;
|
||||
|
||||
const AIRPORTS_SOURCE_ID = 'airports';
|
||||
@@ -218,7 +221,7 @@ export default function FlightMap({ state, hovered, applySnapshot }: MapProps) {
|
||||
const map = new maplibregl.Map({
|
||||
container: containerRef.current,
|
||||
style: styleUrlFor(initialId, available), // local pack or remote OFM fallback
|
||||
center: EUROPE_CENTER,
|
||||
center: WORLD_CENTER,
|
||||
zoom: INITIAL_ZOOM,
|
||||
minZoom: MIN_ZOOM,
|
||||
maxZoom: MAX_ZOOM,
|
||||
|
||||
Reference in New Issue
Block a user