flutter_google_places icon indicating copy to clipboard operation
flutter_google_places copied to clipboard

Limit query results to Basic Data

Open KlausJokisuo opened this issue 5 years ago • 1 comments

Is it possible to limit query results to Basic Data only?

https://woolpert-googlecloud.github.io/maps-platform-best-practices/docs/place-details-fields

Thanks.

KlausJokisuo avatar May 23 '19 16:05 KlausJokisuo

Hello, yes you can limit your received data while you are getting place details.

PlacesDetailsResponse detail = await places.getDetailsByPlaceId(p.placeId!, filelds: [ 'name', 'place_id', 'formatted_address' ] );

You can add as much as fields you want in List<String> format. Note: I wrote as I remember, there could be little differences. You can check while typing code. You need to find 'fields' field.

Basic | address_component, adr_address, alt_id, formatted_address, geometry (location), icon, id, name, permanently_closed, photo, place_id, plus_code, scope, type, url, utc_offset, vicinity

Contact | formatted_phone_number, international_phone_number, opening_hours, website

Atmosphere | price_level, rating, review, user_ratings_total

Regards!

earlybirdsignals avatar Oct 20 '22 06:10 earlybirdsignals