Map
Shows one place, or one pin per row of a list, on Apple Maps.
Use it for: Showing where a job, shop or visit is. Inside a list row or form it shows that row’s address (or latitude and longitude); with bindings.items it shows a pin for each row, named by title, and a pin can run the Map’s action. directions adds a button that opens Apple Maps. The iPhone looks addresses up with Apple’s map service.
- CategoryData
- ChildrenNone
- DataThe enclosing row, or a list operation (bindings.items)
- ActionOptional. With an action the whole block can be tapped: go to a route or run an operation
| Prop | Required | Accepts | What it does |
|---|---|---|---|
address |
No | text in a fixed format | |
latitude |
No | text in a fixed format | |
longitude |
No | text in a fixed format | |
title |
No | text in a fixed format | Shown in the navigation bar. |
height |
No | sm, md, lg |
How tall it is: sm 120, md 200, lg 280, xl 360 points. |
directions |
No | true or false |
|
emptyText |
No | text, up to 200 characters | Shown when there are no rows. |
Every component also accepts id (required, unique on its screen), and the optional preset and style described in Style options. Every component except Screen accepts when, described in Data-driven look.
Example
Section titled “Example”From the Northline Builders example project:
{ "id": "site-map", "type": "Map", "props": { "address": "site-address", "latitude": "latitude", "longitude": "longitude", "directions": true, "height": "sm" }, "when": { "model": "overview", "field": "site-address", "is": { "source": "test", "test": "not-empty" } }}