Architecture decision record · ADR-0012

Results of the build, and changes from the plan

S1, engine load. A dynamic import('maplibre-gl') and a dynamic import of its stylesheet work in a v2 addon under Vite and Embroider.

Status
Accepted
Deciders
Joe Gaudet
Created
Updated
PRD
PRD
Related
None

Context

The plan had spikes S1 to S8 and five open questions with defaults. The build answered them.

Decision drivers

Not recorded in the original ADR.

Options considered

Not recorded in the original ADR.

Decision

  • S1, engine load. A dynamic import('maplibre-gl') and a dynamic import of its stylesheet work in a v2 addon under Vite and Embroider. The consumer does no setup.
  • S2, tests. MapLibre runs in headless Chrome with SwiftShader (--use-angle=swiftshader --enable-unsafe-swiftshader). The tests use a style with no sources, so no test calls the network.
  • S3, controlled view state. Meridian uses the weaker form of ADR 0003. After each move event, @onMove runs. If @viewState does not agree with the camera then, Meridian puts the camera back with jumpTo. A consumer that sets its state in @onMove sees no jump.
  • S4, markers and popups. {{in-element}} into the MapLibre element is stable.
  • S5, style change. @mapStyle calls setStyle with diff: false. On style.load, each yielded component adds its source or layer again, in template sequence.
  • S6 and S7, floor. maplibre-gl 5.0 and later. deck.gl 9.4 MapboxOverlay works with it.
  • S8, support table. The table in the guide is made from supportsOf() of each adapter, so it cannot disagree with the code. The table in plan section 3.4 was a forecast; some cells changed (for example Google and Esri have no geocoding.autocomplete, because their suggestions have no coordinates).
  • Open routing. @meridian-ts/valhalla exists. The Stadia adapter uses it, and uses the Pelias adapter for geocoding.
  • Draw and deck. <Draw @map={{map}}> and <Deck @map={{map}}> take the value that <MeridianMap> yields. They are not map.Draw and map.Deck, because the map package does not depend on them (ADR 0002).
  • The query resource. It takes args (the tracked inputs) and run (the request). The plan showed one run function; that form cannot know which tracked values the request reads.
  • Sync in helpers. Each yielded component applies its arguments in a helper function that the template calls, not in a getter. The Ember lint rules do not permit side effects in getters.

Consequences

  • The adapters that need a paid key (Stadia, MapTiler, Mapbox, Google, HERE, Esri, AWS, and hosted Pelias) have fixtures from the provider documentation. No one called those providers with a real key. Each adapter has a tests/fixtures/README.md that says where each fixture came from and which ones were assembled from a schema.
  • The Google Maps Platform service terms forbid the use of content from the Geocoding, Places, Routes and Geolocation APIs with a map that is not a Google map. The Google adapter README says this on its first line.
  • CI tests Ember 7.3, 6.12 and 5.12. All 52 Ember tests pass on 5.12.

Addendum (2026-12-02): stories and live examples on the marketing page

  • Jig stories. Each component and each adapter has a story in test-app/tests/stories/. The workshop uses live open providers; the test run uses recorded responses and blocks the live servers. Pages publishes the workshop at /meridian/stories/, and the Jig site links to it.
  • Jig needs Ember 6.12. @jig-ts/ember 0.2.0 imports renderComponent from @ember/renderer, which Ember 5.12 does not have. So the stories are outside test-app/app/ (Embroider bundles every file there), and pnpm test:stories is a separate build of the same test page (MERIDIAN_STORY_TESTS=1 selects tests/suite-stories.ts). CI runs it on Ember 7.3 and 6.12. The ember job still tests Meridian on 7.3, 6.12 and 5.12.
  • Live examples on the marketing page. Place search, directions, reverse geocoding and isochrones are real Meridian components in the guide app, at guide/#/embed/<name>. The marketing page shows them in iframes. They call Photon and the Valhalla demo server; the guide tests use recorded responses.

Confirmation

Not recorded in the original ADR.

Interview record

Each question of the interview with its answer and its source. A fact from the code or a document, a question that the author did not ask, and an assumption are rows too.

QuestionAnswerSource
Where does the text of this page come from?From the Markdown file docs/adr/0012-build-results.md at commit ece53da. The text of each section is the text of the Markdown file. A section that the Markdown file does not have says so.Document: docs/adr/0012-build-results.md

Changelog

DateAuthorChange
2026-12-02Joe GaudetStatus in the Markdown file: Accepted (2026-12-02, after M0 to M9).
2026-12-02Joe GaudetCommit 21c5e38: Meridian 1.0: maps and locations for Ember (#1)
2026-12-02Joe GaudetCommit fa9b0fd: Test harnesses for Meridian (#3)
2026-12-04Joe Gaudet (agent)Converted from docs/adr/0012-build-results.md to this page. The text is the text of the Markdown file.

The adr skill of skillsaw wrote this page. The HTML in this file is the source of truth. The diagrams are the Mermaid sources in it.