# Maps written in Markdown

**Récit maps** draw a map from a line of Markdown. A `::map` sits in any scene of any format; an
**atlas** tells a whole story one map view per scene, read by scrolling while the camera moves from
one view to the next. Everything is drawn at build time from the Natural Earth data shipped with
`@recit/geo`: the page makes no request to a tile server, a geocoder or a font service. The atlas
below is one, compiled from
[`examples/atlas-tour`](https://github.com/vguerand/recit/tree/main/examples/atlas-tour); scroll it,
or focus it and use the arrow keys.

<StoryEmbed slug="maps/atlas-tour" />

<details>
<summary>The Markdown source of this atlas</summary>

<SourceFile deck="maps/atlas-tour" title="examples/atlas-tour/atlas-tour.story.md" />

</details>

## What maps give you

<FeatureGrid cols={3}>
  <FeatureCard title="A map in one line" description="::map{region=FR level=admin1} draws the regions of a country as SVG during the build, in docs, report and deck." href="/maps/gallery" />
  <FeatureCard title="An atlas" description="One view per scene, a camera= per view, markers, routes and areas; the camera interpolates the projection between views." site="docs" href="/formats/atlas" />
  <FeatureCard title="Choropleths" description="data= joins a table to the countries or regions by their ISO code; the legend gives explicit bounds and the table stays under the map." site="docs" href="/documentation/writing/maps" />
  <FeatureCard title="Names in your language" description="Country and region names come from Intl.DisplayNames, the text panel follows right-to-left languages, the map never flips." href="/maps/languages" />
  <FeatureCard title="Accessible" description="A figure with a title and a generated description, a table of every region or place, keyboard reading and reduced motion respected." site="docs" href="/formats/atlas" />
  <FeatureCard title="Typed JSON twin" description="Every atlas has a typed JSON form, checked by its schema and convertible both ways with recit convert." site="docs" href="/formats/atlas" />
</FeatureGrid>

## Start an atlas

<TutorialSteps>
  <TutorialStep title="Write the views" duration="2 min">
    An atlas is a story with `format: atlas`; each scene names its view with `camera=`: a country
    code, `world`, an extent or a center and a zoom.

    ```md
    --- id=start camera=FR

    # Lorem ipsum

    --- id=paris camera=[1.4,48.4,3.3,49.3]

    ## Lorem in Paris

    ::marker{lat=48.8566 lon=2.3522 label="Lorem"}
    ```

  </TutorialStep>
  <TutorialStep title="Read it" duration="1 min">
    Start from the template, then publish it in a Récit site with `@recit/site-stories`.

    ```bash
    cp -r examples/atlas-tour my-atlas
    ```

  </TutorialStep>
</TutorialSteps>

The syntax is specified on [docs.recit.dev](https://docs.recit.dev/formats/atlas), and the block on
[Writing › Maps](https://docs.recit.dev/documentation/writing/maps).
