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 prevent OVER_QUERY_LIMIT with google-map-search and input #387

Open
ammopt opened this issue Aug 25, 2017 · 1 comment
Open

How to prevent OVER_QUERY_LIMIT with google-map-search and input #387

ammopt opened this issue Aug 25, 2017 · 1 comment

Comments

@ammopt
Copy link

ammopt commented Aug 25, 2017

Hello.
I'm trying Polymer for the first time and developing a simple view like so:

<paper-input value="{{input}}"></paper-input>
<google-map-search map="{{map}}" query="{{input}}" results="{{results}}"></google-map-search> .....

It kind of works: the map updates the markers based on the results from the input typed in the paper-input element.
However, if I type too fast, I noticed the error on the console:
Cannot read property 'map' of null

After a while I found out it's returning OVER_QUERY_LIMIT status from Places Service. Is there a correct way to prevent this? Thanks!

@chenster
Copy link

Have you tried getAddress from https://stackoverflow.com/a/11825245/3915432? It delays your sending query to Google to prevent reaching the query limits.

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

2 participants