# Flux 2.0 — Map
A route and its stops drawn on a map, with a numbered marker for each stop.
Reference: https://flux.kaptio.com/components/map/
Requires: https://flux.kaptio.com/tokens/v2/flux.css and flux-components.css
## Use it when
Shows where a trip goes. The confirmed route is a solid line in chart-1, the part still being planned is dashed in chart-muted, and each stop is a numbered marker that opens a popup with the night and the place. The map tiles come from the product’s map library; Flux styles the route, the markers, the popup and the legend that sit on top of them.
## Do not use it when
Not as the only way to read a route; pair it with the Itinerary, which carries the same stops as text. Not for a single address; a link to a map service is enough. Not as decoration on a page that does not need geography.
## Markup
### Route
## API
- flux-map (class): The container. data-flux-map selects markers and moves the popup. Give it role="group" and a name.
- flux-map__routes | __route | __route--planned (class): The SVG of route lines over the ground. With a map library, read --flux-map-route and --flux-map-route-planned with getComputedStyle and pass them to its line layer.
- flux-map__marker (class): A button per stop with aria-pressed and aria-label naming the stop number and place. data-title and data-meta fill the popup.
- --flux-x | --flux-y (attribute): Inline custom properties placing a marker or the popup as a percentage of the map. A map library computes them from coordinates.
- flux-map__popup | __popup-title | __popup-meta (class): The details of the selected stop.
- flux-map__legend (class): The key for the line styles.
## Accessibility
- The map is supplementary. Put the same stops in an Itinerary or a list on the page; a screen reader cannot follow a line.
- Markers are buttons in route order, named with their number and place.
- Confirmed and planned differ in line style as well as colour, and the legend says which is which.
- Turn off the map library’s scroll-to-zoom inside a scrolling page, or a wheel gesture traps the reader in the map.
## Keyboard
- Tab: Moves through the markers in route order.
- Enter / Space: Selects the marker and moves the popup to it.
- Escape: Closes the popup.
## Tokens
- --flux-map-height | -ground | -border
- --flux-map-route | -route-planned | -route-width | -route-dash
- --flux-map-marker-size | -marker-bg | -marker-text | -marker-ring
- --flux-map-marker-selected-bg | -marker-selected-text | -marker-selected-border
- --flux-map-popup-width | -popup-bg | -popup-shadow | -popup-padding
## Do
- Use a muted, low-contrast tile style so the route and markers carry the colour.
- Number markers in the order the trip visits them.
## Do not
- Do not use the map library’s default pins or palette; they bypass every theme.
- Do not animate the route drawing in; the line is information, not a transition.