Location Picker

The location picker is the element that is used to select a location on the map in the developed application. The Location Picker element returns the latitude and longitude values when On Clicked in the application.

The Location Picker element is supported in Mobile and Web applications.

1.Adding a Location Picker

To add the Location picker element, select Location picker under the Special category in the Elements panel and add it to your canvas with drag-and-drop.

Open the properties panel by clicking on the element added to the canvas. The Properties panel contains Latitude, Longitude, Authorization, Visibility, and Actions fields.

Latitude: It is the field where latitude information is entered manually from the database or manually.

Longitude: It is the field where the longitude information is entered manually from the database or manually.

If no latitude and longitude values are entered, the location on the map is initialized as (0,0). The user is prompted for location permission. The current location is selected according to user approval.

Authorization: This is the section where the authorization of the Location picker element is done.

Actions: It is the section where actions are added to the Location picker element.

3. Location Picker Example Usage

Let's focus on an example application that selects a location with a latitude of 2.219 and a longitude of 46.76 when the application is run and goes to a location with a latitude of 51.5072 and a longitude of -0.1275 when the button is clicked.

After adding the location picker element selected from the element panel in the application to the canvas, click on the element.

In the properties panel that opens, enter the longitude value of 2.219 and the latitude value of 46.76.

Then add the button element under the location picker from the elements panel. Click the button.

Inside the button, select +Add Action → OnClick → UI Control → Set Value Of.

On the action screen that opens, select Location Picker1 from the Component to change the field.

In the Promp name to set the field, select latitude. In the Value field, enter 51.5072. Repeat the same process one more time and select langitude in the prompt name to set the field. In the Value field, select the value -0.1275.

After entering the values, you can test the entered value by clicking the RUN button on the header.

When the app is opened, it will open with a location near France.

When the button is clicked, the location near London will be selected.

Last updated