I’m building a weather app that allows the user to search by address. I’m currently using a search box with Geographic Places set as the Choice style, using the built-in autocomplete with the Google Places API. I’m then using the Geocoding API to convert the address to coordinates…
It’s working great, but I’m finding that it’s making an excessive number of requests to the Places API. From what I can tell, it’s making a request every time it populates guesses in the auto-complete process.
For example, below is the before and after from performing a single address search:
15 requests were made while performing just 1 search, and my workflow includes only 1 call to the API. This isn’t a big deal for my own testing purposes, but once the app goes live and is being used by actual users, this could really add up.
Is there any way to conserve calls using the built-in geographic places search function?
It looks like Google offers an “offset” parameter where the autocomplete wouldn’t kick in until a set # of characters were typed. I believe this would help to lower the # of requests. Is there any way to enable something like this with the built-in search function?
I guess the alternative would be to use the API connector instead where there is more control over the parameters?
Thanks!
Brandon