Place
The component for adding a map with a specific point of interest.
Declaration
object PlaceProperties
| Name | Type | Description |
|---|---|---|
latitude Required | number | The latitude of the place’s location. |
longitude Required | number | The longitude of the place’s location. |
role Required | string | Always |
accessibilityCaption | string | The caption that describes a place. The text is used for VoiceOver. For more information about VoiceOver, see the Vision page in Accessibility. If you don’t provide |
anchor | Anchor | An object that defines vertical alignment with another component. |
animation | (ComponentAnimation | string("none")) | An object that defines an animation you apply to the component. Use the |
behavior | (Behavior | string("none")) | An object that defines behavior for a component, like Parallax or Springy. Use the |
caption | string | A string that describes the place depicted on the map. For example, if the |
conditional | (ConditionalComponent | [ConditionalComponent]) | An instance or array of component properties that you can apply conditionally, and the conditions that cause Apple News Format to apply them. |
hidden | boolean | A Boolean value that determines whether the component is hidden. |
identifier | string | An optional unique identifier for this component. If you use |
layout | (ComponentLayout | string) | An inline If you don’t define |
mapType | string | A string that defines the type of map to display by default. Valid values:
|
span | MapSpan | The object for defining the visible area of a map, relative to its center. A |
style | (ComponentStyle | string | string("none")) | An inline The |
Discussion
Use the Place component to display a map with a single point of interest. The map automatically centers the point of interest based on the latitude and longitude locations you provide. If you want to display multiple pins on a map, use the Map component.
Example
{
"components": [
{
"role": "title",
"text": "Maps"
},
{
"role": "body",
"text": "With turn-by-turn spoken directions, interactive 3D views, proactive suggestions, lane guidance, and more, Maps gets you where you need to go."
},
{
"role": "heading2",
"text": "Place Heading"
},
{
"role": "place",
"mapType": "hybrid",
"latitude": 35.065908,
"longitude": -109.781623
}
]
}