Debug Google Map AutoFill

Good afternoon.

Now I use Google maps to autocomplete addresses in my service. This is the code:
autocomplete = new google.maps.places.Autocomplete( /** @type {!HTMLInputElement} */ (document.getElementById('address_field')), {types: ['address'], componentRestrictions: {country: 'us'} });

And when I type, it pings google server for suggestions.
These pins take up a lot of tokens.

So, I think - is there a way to drop the request?

I tried debouncing it with the debounce library, but this clearly does not work.
Also tried to add a delay: 300 to the options object, still nothing.

Any help would be greatly appreciated.

+4
source share
1 answer

Autocomplete Google Maps debounce API. , , .

https://code.google.com/p/gmaps-api-issues/issues/detail?id=5831

+7

Source: https://habr.com/ru/post/1656966/


All Articles