Location
Momen supports location-related actions on Web and Native App, including getting the current position, selecting a location on a map, opening a location for navigation, and resolving coordinates to administrative region names.
Location actions include:
- Get Location
- Select Location
- Open Location
- Get Administrative Region Name
Get Location
Overview
Retrieve the device’s current latitude and longitude and assign them to a page variable. Commonly used with map components for ride-hailing, delivery, store finder, and similar scenarios.
Configuration
Add a page variable
Add a Geopoint page variable (e.g. geographic_position) to store the coordinates. Rename variables if the page handles multiple location-related values.
Add the action
Add the Get Location action to a component and assign the result to the page variable. On success, the action returns a geopoint object. Combine with Get Administrative Region Name to resolve an address, or bind directly to a map component.
Use the coordinates
Bind the page variable to a map component for real-time positioning. Before location is retrieved, the map shows a default position; after a successful read, it centers on the user’s location.
Output
| Field | Description |
|---|---|
| Geopoint | Object with latitude and longitude |
| Address | Resolve via Get Administrative Region Name |
| Name | Resolve via Get Administrative Region Name |
Notes
- The first request prompts the user for location permission. If denied, subsequent attempts guide the user to enable permission.
- Web: Requires HTTPS and browser location permission.
- Native App: Requires device location permission.
Select Location
Overview
Let users pick a location on a map and return its coordinates, address, and place name. Common in delivery, ride-hailing, and merchant address entry.
Configuration
Add page variables
Add one Geopoint page variable for coordinates and two Text page variables for address and name.
Add the action
Add the Select Location action and assign latitude/longitude, address, and name to the page variables.
Output
| Field | Description |
|---|---|
| Geopoint | Selected coordinates (latitude, longitude) |
| Address | Full address including region and street |
| Name | Place name at the selected point |
Platform Support
- Native App
Open Location
Overview
Open the system map app at a specified location for navigation or viewing.
Configuration
| Parameter | Required | Description |
|---|---|---|
| Geopoint | Yes | Latitude and longitude to open |
| Address | No | Address label shown on the map |
| Name | No | Place name shown on the map |
Typical setup: After Select Location succeeds, add Open Location and bind the page variables so users can navigate to the chosen point.
Output
No direct output. The system map app opens at the specified location.
Platform Support
- Native App
Notes
Address and name affect the label shown on the map. If omitted, only coordinates are used (no error). Third-party navigation apps may show generic start/end labels.
Get Administrative Region Name
Overview
Convert a geopoint into structured region fields: country, province, city, district, and township. Typically used after Get Location or Select Location.
Configuration
| Parameter | Required | Description |
|---|---|---|
| Geopoint | Yes | Coordinates to resolve |
| Page variable | Yes | Stores the result (e.g. location_info) |
| Fields | No | Select which fields to resolve |
| On success | No | Actions to run after resolution (e.g. show toast, update UI) |
Output
| Field | Description |
|---|---|
| country | Country name |
| province | State or province |
| city | City |
| district | District or county |
| township | Street or township |
Usage
Bind location_info fields to text components or input fields (e.g. pre-fill a delivery address).
Platform Support
- Web
- Native App