Meridian: plan
Meridian is the Ember Workbench library for maps and locations.
Summary
Date: 2026-12-02. Status: built. ADR 0012 records what the build changed from this plan.
Meridian is the Ember Workbench library for maps and locations. It gives three things:
- A declarative map: a port of
@vis.gl/react-maplibre(8.1.3 on the plan date) to Ember.gtscomponents onmaplibre-gl. - A provider layer: geocoding, places, routing and other location services behind small interfaces. The application selects the providers in one configuration.
- UI on top: place autocomplete, a geocoder map control and directions.
The decisions come from 30 answers on 2026-12-02. The ADRs in adr/ give the reasons.
2. Name and scope
- The brand is Meridian.
- The unscoped npm name
meridianis taken (checked 2026-12-02). - Proposed scope:
@meridian-ts, the same pattern as@millwork-ts. No package exists in@meridian-ts,@meridianor@ember-meridianon the registry. - Not confirmed: a scope can exist with no public package. The first step of M0 is your
claim command:
npm org create meridian-ts(or the npm website).
Glossary
Not recorded in the original plan.
Problem and context
Not recorded in the original plan.
Goals and non-goals
Not recorded in the original plan.
Customers
Not recorded in the original plan.
Internal stakeholders
Not recorded in the original plan.
Users and scenarios
Not recorded in the original plan.
Landscape and constraints
Not recorded in the original plan.
Proposed design
3. Architecture
3.1 Packages
| Package | Contents | Peers |
|---|---|---|
@meridian-ts/core |
Coordinate types, capability interfaces, defineMeridian, errors. Plain TS. |
none |
@meridian-ts/ember |
Map components, controls, clusters, resources, UI components, theme.css. |
ember-source, maplibre-gl |
@meridian-ts/draw |
<Draw @map> on terra-draw. |
terra-draw |
@meridian-ts/deck |
<Deck @map> overlay, <deck.Layer>, <deck.HexCluster>. |
@deck.gl/*, h3-js |
@meridian-ts/nominatim |
Adapter. | none |
@meridian-ts/photon |
Adapter. | none |
@meridian-ts/pelias |
Adapter. The Stadia adapter uses it for geocoding. | none |
@meridian-ts/maptiler |
Adapter. | none |
@meridian-ts/stadia |
Adapter. | none |
@meridian-ts/mapbox |
Adapter. | none |
@meridian-ts/google |
Adapter. | none |
@meridian-ts/here |
Adapter. | none |
@meridian-ts/esri |
Adapter. | none |
@meridian-ts/aws |
Adapter. | none |
conformance (private) |
The shared contract test suite for adapters. | none |
- Each adapter calls the provider REST API with
fetch. It does not use the provider SDK. Thus the adapters stay small and they work on the server. - No package for PMTiles.
<MeridianMap @protocols={{...}}>registers a protocol, and the guide shows thepmtilesrecipe. - No package for the theme. It is the
@meridian-ts/ember/theme.cssexport.
3.2 Map components
The names agree with the React library. The root is MeridianMap because Map hides the
JavaScript Map global in a .gts file.
| React | Meridian |
|---|---|
<Map> |
<MeridianMap as |map|> |
<Source> |
<map.Source as |source|> |
<Layer> |
<source.Layer> and <map.Layer @source=…> |
<Marker> |
<map.Marker> (block content is the marker) |
<Popup> |
<map.Popup> (block content is the popup) |
<NavigationControl> and other controls |
<map.NavigationControl>, GeolocateControl, FullscreenControl, ScaleControl, AttributionControl, TerrainControl, LogoControl |
useControl |
<map.Control @create={{fn}} @position=… /> |
useMap, MapProvider |
map.instance in the block, and @onLoad |
terrain, sky, projection, light props |
The same arguments on <MeridianMap> |
<MeridianMap
@mapStyle="https://tiles.openfreemap.org/styles/liberty"
@initialViewState={{hash lng=-123.1 lat=49.28 zoom=11}}
as |map|
>
<map.Source @type="geojson" @data={{this.stops}} as |source|>
<source.Layer @type="circle" @paint={{this.paint}} @onClick={{this.select}} />
</map.Source>
<map.Marker @lngLat={{this.office}} @draggable={{true}} @onDragEnd={{this.move}}>
<OfficePin />
</map.Marker>
{{#if this.selected}}
<map.Popup @lngLat={{this.selected.location}} @onClose={{this.clear}}>
{{this.selected.name}}
</map.Popup>
{{/if}}
<map.NavigationControl @position="top-right" />
</MeridianMap>
Rules:
- A component in the template is the state of the map. When Ember removes the component, the layer, source, marker or control goes away.
- An argument change calls the smallest MapLibre method:
setData,setPaintProperty,setFilter,setLayoutProperty. Meridian does not make the layer again. @mapStylechange drops all sources and layers in MapLibre. Meridian adds them again after the new style loads.- Layer events (
@onClick,@onMouseEnter,@onMouseLeave) are arguments on the layer. Meridian setsinteractiveLayerIdsfor the consumer. - Marker and popup content renders with
{{in-element}}into the MapLibre element. <map.Cluster>is ageojsonsource withcluster: true. It yields the cluster features and the point features so that the consumer renders markers or layers for each.
3.3 Coordinates
LngLatLikein Meridian:{ lat, lng },{ lat, lon },{ latitude, longitude }, or[lng, lat].- One
toLngLat()function in core changes all four into[lng, lat]. - A Millwork value with
latandlng(for example thegeohashvalue) works with no dependency between the two libraries. - Provider results always use
{ lat, lng }.
3.4 Provider layer
// app/meridian.ts
import { defineMeridian } from '@meridian-ts/core'
import { photon } from '@meridian-ts/photon'
import { stadia } from '@meridian-ts/stadia'
import { mapbox } from '@meridian-ts/mapbox'
export const meridian = defineMeridian({
geocoding: photon(),
routing: stadia({ apiKey: config.stadiaKey }),
places: mapbox({ baseUrl: '/api/geo/mapbox' }), // the app's own proxy holds the key
})
const [place] = await meridian.geocoding.forward('1600 Pennsylvania Ave', { signal })
defineMeridiangives a plain object. The application imports it. There is no service and no owner lookup.- A test gives a fake adapter: an object with the same functions.
- A capability that the configuration does not include throws a clear error on first use.
- A function that the selected provider does not support throws
UnsupportedCapabilityError. Each adapter also has asupportslist so that UI can hide a feature.
Capability interfaces (all functions accept { signal }):
| Capability | Functions | Result type |
|---|---|---|
geocoding |
forward(query), reverse(lngLat), autocomplete(text) |
Place[] |
places |
search(text, opts), nearby(lngLat, opts), details(id) |
Place[], Place |
routing |
directions(waypoints, opts), isochrone(lngLat, opts), matrix(origins, destinations) |
Route[], GeoJSON polygons, Matrix |
elevation |
at(lngLats) |
number[] |
timezone |
at(lngLat) |
IANA zone id |
staticMap |
url(opts) |
URL string |
ipLocation |
locate() |
Place |
Placehasid,name,label,location,bbox,addressparts,categories, andraw(the provider response).Routehasgeometry(GeoJSON LineString),distance,duration, andlegswithsteps. A<map.Source>renders the geometry directly.
Planned support (from provider knowledge; M0 confirms each cell against the provider docs):
| Adapter | Geocoding | Autocomplete | Places | Directions | Isochrone | Matrix | Elevation | Time zone | Static map | IP |
|---|---|---|---|---|---|---|---|---|---|---|
| Nominatim | yes | no (policy) | no | no | no | no | no | no | no | no |
| Photon | yes | yes | no | no | no | no | no | no | no | no |
| Pelias | yes | yes | yes | no | no | no | no | no | no | no |
| MapTiler | yes | yes | no | no | no | no | yes | no | yes | yes |
| Stadia | yes | yes | yes | yes | yes | yes | yes | yes | yes | no |
| Mapbox | yes | yes | yes | yes | yes | yes | yes | no | yes | no |
| yes | yes | yes | yes | no | yes | yes | yes | yes | yes | |
| HERE | yes | yes | yes | yes | yes | yes | no | no | yes | no |
| Esri | yes | yes | yes | yes | yes | yes | yes | no | no | no |
| AWS | yes | yes | yes | yes | yes | yes | no | no | yes | no |
Warning: the Google Maps Platform terms limit the use of Google Places content on a map that is not a Google map. The Google adapter docs say this on the first line.
3.5 Reactive resources
Each provider call is a plain async function. @meridian-ts/ember adds one resource for
templates:
suggestions = query(this, () => ({
run: (signal) => meridian.geocoding.autocomplete(this.text, { signal }),
debounce: 200,
}))
{{#if this.suggestions.isLoading}}…{{/if}}
{{#each this.suggestions.value as |place|}}…{{/each}}
- It gives
value,isLoadinganderror. - When the inputs change, it aborts the call in flight.
- M3 first checks if an installed library gives this (WarpDrive
getPromiseState,reactiveweb). Meridian writes its own only if none fits.
3.6 UI components
| Component | Function |
|---|---|
<PlaceAutocomplete> |
An accessible combobox (WAI-ARIA pattern). @provider, @onSelect. Blocks for the input and each option. |
<map.GeocoderControl> |
<PlaceAutocomplete> in a map control. On select, the camera moves to the place. |
<map.Directions> |
@waypoints and @provider. It renders the route layer and yields the routes. |
<DirectionsSteps> |
The list of turn-by-turn steps for one route. |
No component has styles by default. theme.css gives a default look with CSS custom properties.
3.7 Extras
- Draw:
<Draw @map={{map}} @mode="polygon" @features={{this.features}} @onChange={{this.save}} />on terra-draw. The features are GeoJSON. - deck.gl:
<Deck @map={{map}} as |deck|>adds aMapboxOverlaycontrol.<deck.Layer @type={{ScatterplotLayer}} @data=… />is one deck layer. An argument change makes a new layer instance with the sameid, which is the deck.gl update pattern. - Hexagons:
<deck.HexCluster @data={{this.points}} @getPosition=… />puts the points in H3 cells withh3-jsand renders a deck.glH3HexagonLayer. The H3 resolution follows the zoom.@extrudedgives 3D columns.
3.8 SSR
- On the server,
<MeridianMap>renders the container element only. It does not importmaplibre-gl. - The yielded components render nothing on the server.
@meridian-ts/coreand the adapters do not touchwindowordocument.
User interface and prior art
6. Site and guide
6.1 Bench card (at M0)
Add a Meridian card with status bench to the Ember Workbench page in joegaudet.github.io,
with the same steps as the Millwork card: the _tests/tools.mjs entry, the card in
ember-workbench/index.html, the card source in ember-workbench/_src/tools/, a gem from
ember-workbench/_src/gems, then the _tests/ gates. Proposed copy: "Maps, places and routes.
One declarative map, any tile server, any provider."
6.2 Guide (at M9)
The guide is at joegaudet.com/meridian/, with the same layout as /millwork/. Each example
is a live map with its source code.
- Start: install, the first map, the mental model (the template is the map state).
- Map: view state, sources and layers, events, markers, popups, controls, terrain, the escape hatch.
- React example ports: controls, markers, popups, GeoJSON, clusters, heatmap, terrain, draggable marker, side by side, and the others in the React example list.
- Tile servers: OpenFreeMap, PMTiles and Protomaps, MapTiler, Stadia, Martin,
tileserver-gl,
pg_tileserv, raster, WMS, WMTS. - Providers: the configuration, one page for each capability, one page for each adapter with its support list, the key and proxy pattern.
- UI: autocomplete, geocoder control, directions, the theme.
- Extras: draw, deck.gl, hexagon clusters.
- Applications: store locator, delivery tracker, real estate search with WarpDrive and Millwork.
- Coming from React: a table of each React API and its Meridian equivalent.
Examples that need a key use a key that you supply as a Pages build secret. Without the key, the example shows recorded data.
6.3 At release
Set the card to shipped with links, add /meridian/ to sitemap.xml and the homepage, and
add cross-links between the Meridian and Millwork docs.
Requirements
Not recorded in the original plan.
Data model and API changes
Not recorded in the original plan.
Security and permissions
Not recorded in the original plan.
Observability and success metrics
Not recorded in the original plan.
Rollout and migration
Not recorded in the original plan.
Work items
5. Milestones
| M | Scope | Done when |
|---|---|---|
| M0 | Scope claim (yours). Repo from the template. Spikes S1 to S8. ADR updates. | The spikes have tests. CI is green. |
| M1 | MeridianMap, Source, Layer, layer events, view state, @protocols, SSR no-op. |
Render tests pass. A GeoJSON example and a PMTiles example run. |
| M2 | Marker, Popup, all controls, Control, terrain, Cluster. Parity check against the React API. |
Each React example has a passing Meridian port. |
| M3 | @meridian-ts/core interfaces, defineMeridian, conformance suite, query resource. Nominatim, Photon, Pelias. |
The conformance suite passes for the three adapters. |
| M4 | MapTiler and Stadia adapters. | Conformance suite passes. |
| M5 | UI: PlaceAutocomplete, GeocoderControl, Directions, DirectionsSteps, theme.css. |
Interaction and accessibility tests pass. |
| M6 | Mapbox and Google adapters. | Conformance suite passes. |
| M7 | HERE, Esri and AWS adapters. | Conformance suite passes. |
| M8 | @meridian-ts/draw and @meridian-ts/deck with HexCluster. |
Render tests pass. One example each. |
| M9 | Site and guide at /meridian/, all examples, the full applications. Release 1.0 with oss-release. |
The site is live and the packages are on npm. |
- TDD for all behavior: the test first, red, then green.
- A commit at each gate pass. Draft PRs. No merge and no publish by Claude.
- M3, M4, M6 and M7 adapters can run as a team of agents, one package each, because the file scopes do not overlap.
- The release is your one command:
cd ~/dev/meridian && bash ~/.claude/skills/oss-release/release.sh --merge <branch>.
Future work and research
Not recorded in the original plan.
Alternatives considered
1. Decisions (from the 30 answers)
| # | Topic | Decision |
|---|---|---|
| 1 | Source | Port @vis.gl/react-maplibre. MapLibre only, no Mapbox GL engine. |
| 2 | Name | Meridian. A survey name that refers to locations, not only to maps. |
| 3 | Ember target | v2 addon, .gts, Vite and Embroider, Ember 5.12 and later. |
| 4 | Repo | New pnpm monorepo ~/dev/meridian from the OSS template (changesets, oss-release). |
| 5 | Parity | Full parity in 1.0: map, source, layer, marker, popup, all controls, custom control, terrain. |
| 6 | API style | Yielded components: <MeridianMap as |map|> yields <map.Source>, <map.Marker> and the others. |
| 7 | Escape hatch | The block yields the maplibregl.Map instance, and @onLoad sends it. No service. |
| 8 | View state | Controlled (@viewState with @onMove) and uncontrolled (@initialViewState). |
| 9 | Engine load | maplibre-gl is a peer dependency. The addon loads it with a dynamic import(). |
| 10 | Tile sources | Tested examples for OpenFreeMap, PMTiles, MapTiler, Stadia, Martin, tileserver-gl, raster, WMS, WMTS. |
| 11 | Coordinates | Structural types. All objects with lat and lng work, and [lng, lat] arrays. Millwork values fit. |
| 12 | Provider layer | One TypeScript interface for each capability. defineMeridian({...}) selects the adapters. |
| 13 | Capabilities | Geocoding, places, routing, and other services (elevation, time zone, static image, IP location). |
| 14 | Adapters | Nominatim, Photon, Pelias, MapTiler, Stadia, Mapbox, Google, HERE, Esri, AWS. One package each. |
| 15 | Stages | Milestones: open, then hosted, then commercial, then enterprise. One 1.0 with all of them. |
| 16 | Adapter tests | Contract tests on recorded fixtures. An optional job calls the live API when a key is in the environment. |
| 17 | UI | Headless primitives, and also place autocomplete, geocoder control and directions. |
| 18 | Styles | No styles by default. An optional theme CSS file with custom properties. |
| 19 | API keys | Each adapter accepts a public key or a baseUrl for the consumer's proxy. Meridian ships no proxy. |
| 20 | SSR | Safe no-op: an empty container on the server. The provider layer works on the server (fetch only). |
| 21 | Extras | Clusters, draw and edit, deck.gl overlay and H3 hexagon clusters. All in 1.0, as optional packages. |
| 22 | Hexagons | deck.gl H3HexagonLayer through a declarative component. |
| 23 | Examples | The React example set, tile server recipes, provider recipes and full applications. |
| 24 | Site | joegaudet.com/meridian/, a bench card in joegaudet.github.io, the Workbench gems motif. |
| 25 | Async API | Plain async functions with AbortSignal. A thin reactive resource for templates, with debounce. |
| 26 | Plan output | This file and the ADRs. No code and no commit before approval. |
| 27 | Autonomy | After approval: all milestones with no check-ins, a commit at each gate pass, draft PRs. No merge, no publish. |
Risks
4. Risks and spikes
M0 answers each of these with a test and an ADR update.
| Spike | Question |
|---|---|
| S1 | Does a dynamic import('maplibre-gl') and its CSS work in a v2 addon under Vite and Embroider? |
| S2 | Can the tests run MapLibre (WebGL) in headless Chromium in CI? What do the tests assert on? |
| S3 | Controlled view state: how does @viewState stop the camera with no feedback loop? The React library replaces the map transform; find the smallest equivalent. |
| S4 | Does {{in-element}} into a marker or popup element stay stable when MapLibre moves the element? |
| S5 | After setStyle, do the sources and layers come back in the correct order (beforeId)? |
| S6 | Does deck.gl MapboxOverlay (interleaved) work with the selected maplibre-gl floor? |
| S7 | Which maplibre-gl floor? Proposal: 5.0 and later (globe projection). The React library supports 4.0 and later. |
| S8 | Confirm each cell of the support table in 3.4 against the provider docs. Confirm the Google terms. |
Other risks:
- Size. Ten adapters and four capability groups is much code. The conformance suite keeps each adapter to a mapping of request and response.
- Fixture age. A provider can change its API. The optional live job finds this.
- Open routing gap. No open provider in the answer list does routing (see section 7).
Open questions
These do not stop M0. Each has a default that the plan uses if you do not answer.
- Scope. Is
@meridian-tscorrect? Default: yes. - Open routing. Nominatim, Photon and Pelias do no routing. Default: add a
@meridian-ts/valhallaadapter with abaseUrl. The Stadia adapter then uses it, so the cost is small. OSRM is a second option. - MapLibre floor. Default:
maplibre-gl5.0 and later, if S6 and S7 pass. - Site group. Which group on the Workbench page holds Meridian? Default: a new "Maps and places" group.
- Demo keys. Which providers do you have keys for, for the live test job and the guide? Default: fixtures only until you supply keys.
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.
| Question | Answer | Source |
|---|---|---|
| Where does the text of this page come from? | From the Markdown file docs/plan.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/plan.md |
Changelog
| Date | Author | Change |
|---|---|---|
| 2026-12-02 | Joe Gaudet | Commit bca5c8f: Add the plan and the decisions for Meridian |
| 2026-12-02 | Joe Gaudet | Commit 21c5e38: Meridian 1.0: maps and locations for Ember (#1) |
| 2026-12-04 | Joe Gaudet (agent) | Converted from docs/plan.md to this page. The text is the text of the Markdown file. |
| 2026-12-04 | Joe Gaudet (agent) | Status Shipped: version 1.1.0 of the Meridian packages is on npm (@meridian-ts/core 1.1.0, tag v1.1.0). The Markdown file says "Status: built" (2026-12-02). |
The prd skill of skillsaw wrote this page. The HTML in this file is the source of truth. The diagrams are the Mermaid sources in it.