Comment on page
Current Device Location
This property is used to get the current device location (aka geolocation). You can access this when the Source is set to Global Properties.
You can use this property to get the user's current location to update on Google Map or store it in the backend database.
Let's see an example of getting the current device location and passing it to a widget (that supports accepting LatLong, for example, Google Map).
Here is an example of how you can retrieve the current device location:
- 1.Select the widget (e.g., GoogleMap) from the widget tree or canvas area.
- 2.Move to the properties panel, find the Initial Location property, and click on Set from Variable.
- 3.Set the Source to Global Properties.
- 4.Set the Available Options to the Current Device Location.
- 5.Click Confirm.
Getting current device location
Here's how you can save the user's current location (Geolocation) in the Firestore document.
- 1.Create a LatLng field in your Firestore Schema.
Creating LatLong Field
- 2.After this, you need to set this field from a variable source and select Current Device Location from the Global Properties.
Passing current location in LatLong Field