1. Fields
  2. Map Field

Fields

Map Field

The Map Field allows for capturing a position on a visual map.

Basic usage

Adds a map field to the fields of an action.

loading...

Result

The field will be displayed as a map field in the form, as below:

The resultant data will be available in the stubpost.data as:

loading...

This can be substituted with eg. ~~stubpost.data.store_location.latlng where required.

Parameters

See fields for common field parameters like validation and conditional rendering.

params.auto_set_location
optional
boolean

This parameter specifies whether the map should automatically set the location of the user.
If true, the user will be prompted by their browser to allow the system to access their location.

params.hide_geolocate_button
optional
boolean

If set to true, the geolocate button will be hidden from the map field.
Users can typically click the geolocate button to set their current location on the map.