Atlas
Preview format: turns a storyStoryThe compiled model, Story: one source, which every format reads. into an
atlas: a map that stays in place while the text of each view scrolls by, the camera moving from
one view to the next. Every scene is a view: a camera, a text, and the markers, routes and
areas it shows. The base maps come from the Natural Earth data of @recit/geo, cut and projected at
build time: the reader never loads a tile, a font or a geocoder.
recit dev and recit build open an atlas like any other format, and a Récit site publishes one
with @recit/ (publish., <StoryEmbed slug=), as the maps site of the
repository does (sites/maps). A single map inside another format is the
::map block. @recit/atlas is a preview: it stays outside the 1.0
and a minor version may change it.
A minimal atlas
tour.md
The full example, in English and French with its JSON twin, is atlas-tour.
The camera of a view
Each view says what it frames, on its separator line:
| Attribute | What it frames |
|---|---|
camera=FR | a country, by its ISO 3166-1 code (alpha-2 or alpha-3) |
camera=world | the whole world, in Equal Earth |
camera= | an extent in degrees: west, south, east, north |
center= | a center and a zoom from 1 (180° of longitude) to 12, each step halving the span |
| no camera | the extent of the view's layers; a view with neither is an error |
duration=4s | how long the view lasts in a film made from the atlas |
An unknown code, an extent out of bounds or a zoom past 12 is refused with the line of the view.
Layers
The layers of a view are written together at the end of its text, one per line. A layer line anywhere else is an error with its line, so that the Markdown and the JSON twin stay equivalent.
| Directive | What it draws |
|---|---|
::marker{lat lon label} | a place, by its coordinates; its label is the story's own text |
::marker{place label} | a populated place by its name (place=), resolved offline |
::route{from to style reveal} | a great-circle line between two markers (by label) or lat,lon points |
::area{src label reveal} | a GeoJSON file beside the story, never a URL |
style is solid, dashed or dotted; reveal=draw traces a route as the view opens and
reveal=fade fades an area in. A route end resolves against the markers of its view, then of the
whole atlas.
place= names a place of the offline gazetteer of @recit/geo (Natural Earth populated places), as
in a ::map: the atlas resolves it when it is built, without
network, and its label is the place's name unless label= is written, so ::route{from=
joins ::marker{place=. An unknown or ambiguous name is an error of its view. The JSON twin
keeps place as written.
Reading it
- Scrolling: the view whose text crosses the middle of the screen is the active one; the camera interpolates the projection to it, then reveals its layers.
- Keyboard: the reader is one focusable region. Arrow Up and Down, Page Up and Down, Home and End move view by view; the buttons under the map do the same.
- Reduced motion: with
prefers-, each view appears settled, without a move.reduced- motion - Languages: the names of countries and regions come from
Intl.. In a right-to-left language (DisplayNames lang: ar, as inexamples/), logical CSS properties move theatlas- tour/ atlas- tour. story. ar.md sidetext column to the inline-start side and flip the view navigation bar, while<svg>keepsdirection:: the projection never mirrors (north stays up, west stays left) and markerltr <text>labels keep theirstartanchor to the right of the dot. On desktop, the sticky map stage reserves the navigation bar's height so the « Made with Natural Earth » attribution stays visible across every view.
Settings
In the front matter, or for every atlas of a project in the atlas: section of recit.
(the front matter wins, then the section, then the default):
| Setting | Values | Default |
|---|---|---|
projection | the projections of ::map | equal-earth |
basemap | land, admin0, admin1, none | admin0 |
layout | side, overlay, full | side |
worldview | default (the de facto borders of Natural Earth), or a point of view: IN, MA… (maps) | default |
insets | none, or auto: Guadeloupe, Martinique, French Guiana, Réunion and Mayotte in a column beside an atlas of FR (maps) | none |
recit.config.ts
side puts the text in a column beside the map, overlay in cards over it, full under it.
basemap: draws the regions of the country a view shows. The scene attribute camera= is
in the camera of a view, and duration= sets the length of a view in a
film.
The JSON twin
Every atlas has a typed JSON form, kind: with format:, checked by
AtlasSourceSchema of @recit/ and its JSON Schema
(https://, x-). recit convert turns one
into the other, and the round-trip test checks that both compile to the same views. In JSON, a view
is { id, camera, layers?; its layers are the scene's layers.
| Key | Type / values | Effect |
|---|---|---|
scenes | AtlasSceneSource[] | Required in kind:. Views of the atlas, in scrolling order (--- separators in Markdown). |
scenes.id | string (non-empty) | Required. Stable view identifier across languages (--- id=…). |
scenes. | "world", "FR", [w, s, e, n] or { center, zoom } | Framing of the view (camera= or center=, with zoom from 1 to 12). Omitted, a later view keeps the previous camera and the first frames layers. |
scenes. | integer (> 0) | Optional shot duration in milliseconds for the bridge to a film (duration=4s ↔ 4000). |
scenes. | AtlasLayer[] | Optional marker, route and area layers parsed from the closing layer lines of the view. |
scenes.body | string or Record<string, string> | Optional Markdown or MDX prose of the view before its closing layer lines (Scenes). |
scenes.notes | string or Record<string, string> | Optional author notes (:::notes; Scenes). |
scenes.attrs | Record<string, string | number | boolean> | Optional separator attributes (--- key=) other than id, camera, center, zoom and duration. |
Commands
| Command | What it does |
|---|---|
recit dev tour.md | the atlas with live reload |
recit build tour. | prerendered in one language (--locale fr), nothing off-site |
recit validate tour.md | the story against its schema, with the line of each problem |
recit convert tour. | the JSON twin; --to md goes back to Markdown |
recit convert tour. | one slide per view |
recit convert tour. | one map shot per view, for recit render |
recit convert tour. | one 9:16 card per view |
recit convert events. | the map view of a calendar |
A view with no camera and no layer, an unknown country code, an extent out of bounds or a zoom past
12 are errors with the file and the line, in the form ✖ tour.. Every command and its
flags are in the CLI reference.
Bridges
Closed bridges, from @recit/. The atlas owns its outgoing bridges; the one that comes
in, from a calendar, is the exception written on the Bridges
page.
| From → to | Function | Command |
|---|---|---|
| atlas → deck | atlasToDeck | recit convert tour. |
| atlas → film | atlasToFilm | recit convert tour. |
| atlas → webstory | atlasToWebstory | recit convert tour. |
| calendar → atlas | calendarToAtlas | recit convert events. |
- To a deck: each view becomes a slide with the same
id, its text first, then a:::mapframing what the camera framed (a centre and a zoom become their extent) with the view's layers. A view too dense for a slide is refused with its line, never summarised; aworldviewother thandefaultbecomes theworldview=of each map, andlayoutis dropped with a warning. A view without a camera is framed on its markers, itsplace=markers included when the bridge is given the offline gazetteer (places, whichrecit convertpasses); without it, such a view shows the world with a warning. - To a film: each view becomes a
mapshot. The camera moves from the view before to its own by interpolating the projection, then the routes and areas appear as theirrevealsays; the text is the voice-over, andduration=the length of the shot. The base map rides in the film, sorecit renderreads no asset. - To a webstory story: a title card, then each view becomes a 9:16 card with the same
id, its text then its:::map,duration=as the card'sdur. A view beyond the density of a card (40 words, 5 bullets) is refused with its line; views beyond the 30 cards of a story are left out with a warning. An area's file is written from the folder of-o, which must be the atlas's folder or above it: a story reads no file outside its folder. - From a calendar (
calendarToAtlas, which reads the calendar model from@recit/): the optional map view of atime/ calendar calendar. Its events whose place has ageo([lat, lon]) become an atlas: a first view with all of them, then a view per event ahead, centred on its place, with its title, its date and its place. An event withoutgeostays off the map with a warning: nothing is geocoded, nothing is fetched.