User Manual

Location Get Current Coordinates

Location Get Current Coordinates

The Location Get Current Coordinates action allows you to obtain the latitude and longitude information of the user's current physical location in real time. This action is one of the building blocks for developing location-aware applications.

Technical Features

  • Real-time Location Retrieval: The user's current location information is retrieved.
  • Mobile & Web Support: Works on both web and mobile applications.
  • Dynamic Usage: Location information that changes with the user's movement can be used dynamically.
  • Map Integration: The coordinates obtained can be displayed visually with a map component.
  • Permission Requirement: Location access permission is requested from the user in order to obtain location information.

Location Get Current Coordinates Action Application Steps

1. Action Definition in UI Design

  • Log in to the Kuika platform.
  • Open the project you will be working on from the Apps screen.
  • Go to the UI Design module.
  • Select the element to which the action will be added (e.g. a button).
  • + ADD ACTION → Initial Actions → Geolocation → Location Get Current Coordinates.

2. Configure Action Parameters

This action does not take parameters directly. When the action is executed, it automatically returns the following outputs:

  • Latitude: Latitude value of the user's location.
  • Longitude: Longitude value of the user's location.

Use Case: Display the user's current location on the map

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

  1. Add an Action to the ‘Get My Location’ Button
    • Select the button → +ADD ACTION → OnClick → Geolocation → Location Get Current Coordinates
  2. Add Set Value Actions to Use the Results
    • Set Value
      • Target
      • Value
    • Set Value
      • Target
      • Value
    • Set Value (For Map)
      • Target
      • Value

Location Get Current Coordinates Action Advanced Customisations

  • Automatic Map Marking: The user's location can be displayed as a pin on the map.
  • Navigation Triggering: The coordinates obtained can be used in processes such as route creation or distance calculation.
  • Refresh with GPS: The action can be retriggered at specific intervals as the user changes location.
  • Integration with Forms: Address information can be obtained from delivery, reservation or visit forms using the ‘My Location’ button.

Technical Risks and Controls

  • Location Permission Requirement: The process will fail if the user does not grant location permission in their browser or device settings. Error checking should be performed.
  • Browser/Support Incompatibility: Location services may not work on older browsers or devices.
  • Empty Results: Coordinates may not be obtained in closed areas or environments without GPS access.
  • Response Time: The location retrieval process may take a few seconds. The user should be informed with a loader.

With the Location Get Current Coordinates action, you can obtain users' real-time locations and use this information in map, form, or content-based systems. It provides a reliable and flexible structure when developing location-based applications.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar