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.
source
share