Skip to content

Added info for legacy API and updated Arcade #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions docs/ff-integrations/maps/google-maps/generate-maps-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ com/embed/2c644aa950c44f76b19c6787784cf3b5?sid=3e22206e-4b4b-4734-b842-0c644d32f

## Add Places APIs

To enable **Places API** in your project, please follow the steps under
["Add Maps API" section](#add-maps-apis) and additionally also enable Places API from the API
library if not
already enabled.
You can [enable the **Places API**](https://console.cloud.google.com/apis/library/places-backend.googleapis.com) from your Google Cloud Console — make sure you are in the correct Google Cloud project. **Please note** that the current [PlacePicker widget](../../maps/google-maps/place-picker-widget.md) uses the legacy Places API. We plan to update the PlacePicker widget soon to support the new API. In the meantime, ensure that the legacy Places API is enabled for full functionality.

![places-api.png](imgs/places-api.png)

Expand Down
38 changes: 5 additions & 33 deletions docs/ff-integrations/maps/google-maps/place-picker-widget.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Here's an example from the Demo app:

:::info[Prerequisites]
- The Place Picker **requires a Google Maps API key**. See how to [**create and add API keys**](generate-maps-keys.md#add-maps-apis) to FlutterFlow.
- Ensure you have enabled **Places API** from Cloud console. [**Check out the Setup docs.**](generate-maps-keys.md#add-places-apis)
- Ensure you have enabled the [**Places API**](generate-maps-keys.md#add-places-apis) from Cloud console.
- Enable **Google Maps Platform Billing** via your Cloud console. Please note: Failing to enable the Google Maps Platform Billing will not show any place in an autocomplete list.
:::
<figure>
Expand Down Expand Up @@ -98,9 +98,9 @@ If you retain the Text widget, the text will update to the name of the selected
<figcaption class="centered-caption">The widget properties of Place Picker widget</figcaption>
</figure>

## Use PlacePicker widget state values
## Use PlacePicker Values

The values associated with the selected place are stored in a `GooglePlace` custom data type exposed by FlutterFlow. It holds fields such as the selected place's Name, Address, LatLng, City, State, Country, and Zipcode. Users can use these values in any widget, either to directly set them in a Text widget or for further conditional calculations.
The selected place’s details are stored in a `GooglePlace` custom data type provided by FlutterFlow. You can access this via **Widget State > placePickerValue**, which includes fields like name, address, latitude/longitude (LatLng), city, state, country, and ZIP code. These values can be used to display content in Text widgets or perform conditional logic based on the selected location.

<div style={{
position: 'relative',
Expand All @@ -109,7 +109,7 @@ The values associated with the selected place are stored in a `GooglePlace` cust
width: '100%'
}}>
<iframe
src="https://demo.arcade.software/uWaLSOHPZctjnGik03Pu?embed&show_copy_link=true"
src="https://demo.arcade.software/oje0Gsbf9IJh7M0pb6Tv?embed&show_copy_link=true"
title="Use PlacePicker widget state"
style={{
position: 'absolute',
Expand All @@ -128,32 +128,4 @@ The values associated with the selected place are stored in a `GooglePlace` cust
</iframe>
</div>

<p></p>
Let's test this change in Test Mode:

<div style={{
position: 'relative',
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
height: 0,
width: '100%'
}}>
<iframe
src="https://demo.arcade.software/2ncapOklwNGM3ETCntdl?embed&show_copy_link=true"
title="Place Picker Test"
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
colorScheme: 'light'
}}
frameborder="0"
loading="lazy"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
allow="clipboard-write">
</iframe>
</div>

<p></p>