feat(studio): maps framed by hand, across the antimeridian, with the small islands

The vector map draws a hand-framed view as given, widened to the frame's
proportions as the fit always was, and the tile grid takes the same
extent. A view east of 180 lifts the stops, tracks, roads and outlines
west of it by a turn, so Fiji is one map rather than two halves of the
world. The fit, the bows and the route's extent move to travel/mapFit.ts,
which takes TravelElements.tsx from 1559 to 1332 lines.

Hawaii and other small islands vanished because the bundled outlines
drop every ring below 1.2 % of the mainland (#3056). A finer set, built
from the same admin-0 boundaries by scripts/build-country-detail.mjs, is
served as one static file per country under country-detail/ and loaded
when a map's route (or its own view) is regional, or when coastDetail
asks for it; the coarse outline stays the fallback offline and until a
file arrives. The decision reads the route, not the fitted window, since
fitted to its countries a Hawaii trip falls back to the whole United
States. The export waits for the files before the sheets render, the
trip PDF's outline map loads them for a regional route, and the service
worker keeps them once fetched without precaching them.
This commit is contained in:
Maurice
2026-11-30 14:40:05 +01:00
parent 83f3fee848
commit 5990792e0b
217 changed files with 1560 additions and 324 deletions
@@ -0,0 +1,9 @@
import { http, HttpResponse } from 'msw';
/**
* The finer country outlines a regional book map asks for
* (src/components/Studio/countryDetail.ts), answered as missing, so a map in a
* test draws its coarse outline as it does when a file cannot be fetched. A
* test about the finer outline overrides this with server.use().
*/
export const countryDetailHandlers = [http.get('/country-detail/:file', () => new HttpResponse(null, { status: 404 }))];
+17 -15
View File
@@ -1,24 +1,25 @@
import { authHandlers } from './auth';
import { settingsHandlers } from './settings';
import { addonHandlers } from './addons';
import { adminHandlers } from './admin';
import { assignmentsHandlers } from './assignments';
import { authHandlers } from './auth';
import { budgetHandlers } from './budget';
import { countryDetailHandlers } from './countryDetail';
import { dayNotesHandlers } from './dayNotes';
import { externalHandlers } from './external';
import { filesHandlers } from './files';
import { notificationHandlers } from './notifications';
import { vacayHandlers } from './vacay';
import { tripsHandlers } from './trips';
import { packingHandlers } from './packing';
import { placesHandlers } from './places';
import { pluginSearchHandlers } from './pluginSearch';
import { assignmentsHandlers } from './assignments';
import { packingHandlers } from './packing';
import { todoHandlers } from './todo';
import { budgetHandlers } from './budget';
import { reservationsHandlers } from './reservations';
import { filesHandlers } from './files';
import { tagsHandlers } from './tags';
import { dayNotesHandlers } from './dayNotes';
import { toursHandlers } from './tours';
import { adminHandlers } from './admin';
import { sharedHandlers } from './shared';
import { externalHandlers } from './external';
import { routingHandlers } from './routing';
import { settingsHandlers } from './settings';
import { sharedHandlers } from './shared';
import { tagsHandlers } from './tags';
import { todoHandlers } from './todo';
import { toursHandlers } from './tours';
import { tripsHandlers } from './trips';
import { vacayHandlers } from './vacay';
export const defaultHandlers = [
...authHandlers,
@@ -42,4 +43,5 @@ export const defaultHandlers = [
...sharedHandlers,
...externalHandlers,
...routingHandlers,
...countryDetailHandlers,
];