Bixby Developer Center

Guides
References

map-card

optionalmultiple allowed

A card that displays a summary of a location on a static map. You can add markers on the map to indicate points of interest.

Note

If you define an intent for the on-click key of this card, the intent is not passed in the following situations:

  • If this card is inside of a compound-card. The parent compound-card should be clickable and not individual components within it.
  • If this card is not inside of the Details mode of a view. Specifically, consider these examples:
    • If you have this card in an input-view and are using cards to list options for a user to choose, then clicking the card will choose the card and the defined intent is not passed.
    • If you have this card to list results with list-of, then clicking the card opens the selected item in Details mode and the defined intent is not passed. You cannot get to the Details mode in result-view if the has-details key is set to false.

Examples

result-view {
match: RideShare (rideShare) {
from-output: ShowRideShareMap
}

message {
template ("Here is a map of your ride:")
}

render {
layout {
section {
content {
map-card {
aspect-ratio (1:1)
title-area {
slot1 {
text {
value ("#{value(rideShare.productType)}")
style (Title_L)
}
}
slot2 {
single-line {
text {
value ("Arrives in #{value(rideShare.pickupETA)}")
}
}
}
}
markers {
marker {
geo (rideShare.sourcePoint)
icon ("/images/icons/green-map-marker.png")
width (15)
height (20)
anchor-x (5)
anchor-y (15)
rotation (0)
}
marker {
geo (rideShare.destinationPoint)
icon ("/images/icons/red-map-marker.png")
width (20)
height (20)
anchor-x (5)
anchor-y (15)
rotation (0)
}
}
}
}
}
}
}
}

View on GitHub

Here is how a map-card appears on different devices:

MobileWatchTV (Expanded View)Fridge
map-cardmap-cardmap-cardmap-card
Note

The look and feel of this Views component might differ between devices, specifically with respect to spacing. Mobile, tablet, and fridge devices are similar in design, for example, but have varying resolution and spacing specifications.

Design Considerations

This component is applicable to these moments:

You can find design specifications for this component in the Components Spec download under Design Resources.

Child Keys

markers
required
A set of markers that enable you to set one or more locations on a map-card
title-area
required
Layout container to hold a title area, which can contain title text and other detailed text
aspect-ratio
optional
Determines the map card's aspect ratio
bg-color[deprecated]
optional
This key is deprecated
on-click
optional
Defines an intent to use when a user clicks on the component
size[deprecated]
optional
This key is deprecated
zoom
optional
Integer value that indicates the zoom-level of the map