For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update Location

The Update Location interaction captures the device's current geographic coordinates and stores them for use by the component.

Overview

The Update Location interaction updates the device's geolocation โ€” its latitude and longitude โ€” by requesting the current position from the browser or device. Use it when your component needs the user's current coordinates for location-based logic, such as stamping a record with where an action took place or propagating the position to other interactions.

Because the coordinates come from the browser or device, the user is typically prompted to grant location access the first time the interaction runs.


Configuration

The interaction runs when its triggering event fires (for example, an On Click on a button). It has no input settings of its own โ€” you configure what happens after the location is retrieved:


Example

Goal: Let a user record their current location with a single button click.

  1. Add an Avonni Button component (e.g., "Update My Location").

  2. Add an On Click interaction and set the Action Type to Update Location.

  3. On Success: Add a Show Toast (Success variant) to confirm the location was captured.

  4. On Error: Add a Show Toast (Error variant) so the user knows the location could not be retrieved.

Last updated

Was this helpful?