ReferenceComponents

map

Places on a map: stores nearby, a route, where the courier is.

Where things are. map puts up to ten pins on a map — the stores near the user, the stops of a route, where the courier is now — with a short label each.

On the page the map is a still picture of the pins; a tap opens it full screen, where it pans and zooms, and offers Open in Maps. The SDKs draw it with MapLibre over open map data from OpenStreetMap, served by OpenFreeMap; no map provider sees anything but the tiles it is asked for.

Drawn live in your browser with the SDK’s own sizes and colours, not a screenshot.

Rendered natively by the Flutter SDK since 0.43.0 and the web SDK since 0.20.0. A build that does not declare it is never offered it.

Flutter 0.43 and later need Flutter 3.29 / Dart 3.7 and, on Android, JDK 21, for maplibre_gl. On the web, a site that sends a Content-Security-Policy must also allow connect-src https://tiles.openfreemap.org and worker-src blob:, or the map draws empty; see Web SDK.

What the server checks

Every pin's coordinates have to be exactly what one of your actions returned. The model never gives a map image or a tile address.

Props

Every block also carries type and a required fallback_text of 1 to 300 characters.

PropTypeRequiredConstraints
pinsarrayYes1 to 10 entries.
pins[].latnumberYes-90 to 90.
pins[].lngnumberYes-180 to 180.
pins[].labelstringYes1 to 60 characters.
pins[].subtitlestringNoUp to 80 characters.
captionstringNoUp to 120 characters.

On the wire

{
  "id": "blk_87",
  "type": "map",
  "fallback_text": "Two stores near you: Kalverstraat (1.2 km) and De Pijp (2.8 km).",
  "props": {
    "pins": [
      {
        "lat": 52.3702,
        "lng": 4.8913,
        "label": "Kalverstraat",
        "subtitle": "1.2 km · open until 20:00"
      },
      {
        "lat": 52.3546,
        "lng": 4.8932,
        "label": "De Pijp",
        "subtitle": "2.8 km · open until 18:00"
      }
    ],
    "caption": "Neon Kicks stores with your size in stock."
  }
}

Interaction

On the page the map does not move, so it never fights the page's scroll. A tap opens it full screen: there it pans and zooms, a tapped pin shows its label and subtitle, and Open in Maps opens that pin, or the first, in the maps app. Where the map cannot be drawn, the pins are listed as rows, each still opening in the maps app. Pins must come from your actions' results.