Actions

open-map

10min

The open map action lets you tap the on-screen button to open your device's default map app (e.g., Google Maps, Apple Maps, or Waze) with the provided destination address. If multiple map apps are available, they will be listed for you to select one.

Open map action
Open map action


Configuration options

Some properties are common to all components, see Common component properties for a list and their configuration options.



Core structure



title

Provide the action with a title, for example, Navigate.

address

Address of location - geocode string address to location. Valid formats are: - address string - city, street, e.g. address: 20 W 34th St., New York, NY 10001, USA or in an expression calling a datasource =@ctx.datasources.address - latitude and longitude, e.g. address: 40.759412, -73.912306 - DMS format

- latitude and longitude, e.g. address: latitude: 40.74860 longitude: "-73.98566"

Other options



icon

Select an icon to display when the action is configured as the secondary button or in a header action.

isHidden

false hides the action button, true shows the action button. Default setting is true.

styles

isDanger - Styles the action button in red or your brand's designated danger color. isDisabled - Displays the action button as greyed out. isPrimary - Styles the action button in blue or your brand's designated primary color. isSecondary - Sets the action as a secondary button, accessible via the ellipsis. The icon property can be used when the action button is displayed as a secondary button.

Examples and code snippets 

Open map action button

Open an address on a map
Open an address on a map


In this example, a button at the bottom of the screen uses the action.open-map to open a modal listing the available map apps on the device. Select your preferred app to navigate to the specified address.

YAML


Open map from a list (onPress)

This example includes a list of people and places in New York. Tapping the rightElement button opens a modal, displaying available map apps on the device. Select your preferred app to navigate to the specified address. The addresses are defined in a datasource in various formats, including text strings, latitude, and longitude.

Open an address from a list
Open an address from a list

open-map.jigx
datasource


Open the map from a secondary action button

Open - map as secondary action
Open - map as secondary action


This example describes Central Park in New York. Tapping the ellipsis opens the secondary action button, which is configured with an icon displayed to the left of the title. When tapped, a modal opens, listing available map apps on the device. Select your preferred app to navigate to the specified address, defined by latitude and longitude.

open-map-secondary.jigx


Jig header with open-map action icon

Action in jig header
Action in jig header


In this example, the action.open-map is configured in the jig.header action to open a modal listing the available map apps on the device. Select your preferred app to navigate to the specified address. The action is configured with an icon rather than a button.

open-map-header.jigx






Updated 17 Feb 2025
Doc contributor
Did this page help you?