Skip to content
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

How to customize the fields? #36

Closed
ryakoviv opened this issue Apr 4, 2019 · 4 comments
Closed

How to customize the fields? #36

ryakoviv opened this issue Apr 4, 2019 · 4 comments

Comments

@ryakoviv
Copy link

ryakoviv commented Apr 4, 2019

How I can customize the fields like here https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete
image

@ryakoviv
Copy link
Author

ryakoviv commented Apr 4, 2019

It is important because by customizing fields you can decrease number of request and save your money https://developers.google.com/places/web-service/usage-and-billing

@guillermogfer
Copy link

It could be done with the 'options' object like this:

[options]="{
    types: [],
    componentRestrictions: { country: 'UA' },
    fields: ['address_components', 'geometry', 'types']
    }"

But according to the current Options class, only bounds, componentRestrictions and types are considered

@skynet2
Copy link
Owner

skynet2 commented Jun 1, 2019

Hi @guillermogfer ,

Yes you are right, it can be done with options, current options class done have support for that fields, but as far as it`s javascript, you can add that field in options or cast object to any

cc @ryakoviv

@skynet2 skynet2 closed this as completed in 3013105 Jun 1, 2019
@skynet2
Copy link
Owner

skynet2 commented Jun 1, 2019

@ryakoviv new fields were added in 2.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants