When a user clicks the ‘Get My Location’ button in the application, the system should obtain the latitude and longitude information of the current location and display it on the map and on the screen.
Application Flow
- Drag and drop the following elements from the Elements panel:
- Button → Button that initiates the ‘Get My Location’ action (btnGetLocation)
- Map → Map component to display the coordinates obtained (mapLocation)
- Label → Latitude information (labelLatitude)
- Label → Longitude information (labelLongitude)
Action Configuration
- Add an Action to the ‘Get My Location’ Button
- Select the button → +ADD ACTION → OnClick → Geolocation → Location Get Current Coordinates
- Add Set Value Actions to Use the Results
- Set Value →
- Set Value →
- Set Value (For Map) →