Google-Api-Helper icon indicating copy to clipboard operation
Google-Api-Helper copied to clipboard

Additional charges for contact/atmosphere

Open appleshine opened this issue 5 years ago • 5 comments

Hi, isit possible to add filtering for the fields retrieved? Cause i noticed u queried for the contact number which will incur additional charges. But I would only want general information like the address and place name only.

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

appleshine avatar May 12 '20 05:05 appleshine

Hi @appleshine , Can you elaborate a little more. I'm not fully able to understand what exactly you want. Thanks!

tryWabbit avatar May 12 '20 05:05 tryWabbit

I want to be able to filter for only the fields that I need eg. formatted_address

https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJlQ-ho9OEQIgRLQeLM-VMRMc&fields=name,formatted_address,address_component,geometry&key=YOUR_API_KEY

or

let fields: GMSPlaceField = GMSPlaceField(rawValue: UInt(GMSPlaceField.name.rawValue) |  UInt(GMSPlaceField.addressComponents.rawValue) |  UInt(GMSPlaceField.formattedAddress.rawValue) |  UInt(GMSPlaceField.coordinate.rawValue))!
autocompleteController.placeFields = fields

appleshine avatar May 12 '20 05:05 appleshine

Right now we don't have support for this, but you can refer to this #2 and add the required key from here https://woolpert-googlecloud.github.io/maps-platform-best-practices/docs/place-details-fields.html to filter data you need.

tryWabbit avatar May 12 '20 05:05 tryWabbit

ohh okay will try that.. thanks!

appleshine avatar May 12 '20 05:05 appleshine

one more question! does the library support the session token handling?

appleshine avatar May 12 '20 06:05 appleshine