airport-one-widgets 0.4.28 → 0.4.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -341,6 +341,39 @@ CSS parts: `destination-catalog-container`, `destination-catalog-header`, `desti
341
341
 
342
342
  Demo: `/demo/destination-catalog.html` (`npm run dev`) renders sample ATW data through `previewPayload` with controls for view, shows, pricing, and placement width.
343
343
 
344
+ ## Route Map (Marketing)
345
+
346
+ `fma-route-map-marketing` (AIR-1929) is the marketing version of the route map for an airport's own website: a static, branded map of where you can fly nonstop, with no basemap and no runtime map library. Data comes from `GET /v1/widget-instances/{id}/route-map-marketing`: filed nonstops (year-round, seasonal, new), the airport's coming soon list and charter categories from the portal's Managed routes settings, and the top one-stops. Like the route map it renders only for an active instance allowlisted for the embedding site, or from `previewPayload` in the portal builder.
347
+
348
+ ```html
349
+ <fma-route-map-marketing
350
+ data-widget-instance-id="YOUR-INSTANCE-ID"
351
+ ></fma-route-map-marketing>
352
+ ```
353
+
354
+ The US states are inline SVG paths pre-projected to an Albers conic at build time (`scripts/build-route-map-marketing-geo.mjs`), so the map costs no network request. Only when a destination needs them does the widget fetch, once per page, `GET /v1/geo/route-map-marketing/{neighbours|alaska|hawaii|world}`: Canada, Mexico and the Caribbean drawn a step quieter than the US, and Alaska and Hawaii as inset boxes in the bottom-left corner.
355
+
356
+ On the North America view, destinations beyond the neighbouring countries (Europe, Asia) are edge markers pointing the way the route leaves the map. Those routes, or `initial-view="world"`, also load the `world` layer (about 105 KB gzipped): every country and the US states on an Equal Earth projection centred on the Americas. Once it loads, a North America / World switch beside the filters lets visitors move between the two views, and tapping an edge marker opens that city on the world view. The world view fits every nonstop and never zooms in past about 240° of longitude, so Europe or Asia shows beside North America even for a domestic-only airport. If a layer fails to load, its destinations fall back to edge markers and the switch stays hidden.
357
+
358
+ Attributes (each overrides the saved instance):
359
+
360
+ | Attribute | Default | Purpose |
361
+ | ----------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------- |
362
+ | `layout` | `bold` | `bold` (boxed, with heading and filters) or `transparent` (no background, for a page with its own image or colour) |
363
+ | `theme` | `brand` | `brand` (land in the airport's brand colour), `neutral` (grey land, ink routes) or `dark` |
364
+ | `city-labels` | `always` | `always` places a label for every city that fits; `hover` shows them only on hover or focus, which suits busy airports |
365
+ | `zoom-controls` | off | `true` adds zoom buttons, drag to pan and Ctrl/⌘-wheel zoom |
366
+ | `show` | `full` | `map` hides the heading, destination list and footer |
367
+ | `initial-view` | `north-america` | The view the map opens on: `north-america` or `world` |
368
+ | `primary-color` / `secondary-color` | airport brand | Land and served tint / routes, dots and the card button |
369
+ | `geo-base-url` | widget API | Where the geometry layers load from |
370
+
371
+ Below 560 px of container width the city card becomes a bottom sheet, labels hide until zoomed in, and an A–Z list of cities appears under the map. Segment events (under `consent-analytics`): `map_view`, `map_route_click`, `map_filter`, `map_zoom`, `map_view_switch`, plus the shared `Widget V2 Mount` / `Widget V2 Public Config`.
372
+
373
+ CSS parts: `route-map-marketing-container`, `route-map-marketing-header`, `route-map-marketing-filters`, `route-map-marketing-map`, `route-map-marketing-legend`, `route-map-marketing-city-card`, `route-map-marketing-destination-list` and `route-map-marketing-footer`.
374
+
375
+ Demo: `/demo/route-map-marketing.html` (`npm run dev`) renders sample ATW, CID, SDF and SFB data from the mockup, plus SMF (insets) and CVG and SJC (edge markers on North America, routes to Europe and Asia on the world view), with controls for every setting, placement width and page background. The dev server serves the geometry layers itself under `/demo-geo`.
376
+
344
377
  ## Carfare Search
345
378
 
346
379
  Core Purpose: