Hey guys
I am using autocomplete funcionality with custom list view for adress searches I call our API - where we implemented caching of requests with some expiration, and only when our API doesnt know the answer we ask HERE service. But still as amount of users and overall usage of our apps increase the costs are geting higher and higher.. its already few hundreds of euros monthly..
we are now consuming over 200 000 autosuggest api calls per month...and its growing...
So I am thinking about further optimization.... like don't send each request over 3 letters on _TextChanged event to API and implement some delay like 300ms to slow the flow of api calls and wait until the user really finished writing.. Also I dont want to decrease UI feeling.. so user doesnt think that service is not responding...
like don't send each request over 3 letters on _TextChanged event to API and implement some delay like 300ms to slow the flow of api calls and wait until the user really finished writing
Another idea would be to use Nominatim, which is based on Openstreetmap. You can run the API on your own Postgresql server, thus avoiding the expensive Here API. You can leave the Here API in as a backup, if the nominatim API does not land a hit, then you query the Here API.
Here's a demo of how to use the nominatim geocoding API for free. Note: There are other geocoding options if you want to know, leave your comments. Demo file attached Sub GeoCoderNominatim(Query As String) As ResumableSub Dim ResultURL As String Dim j As HttpJob Dim Parameter() As...
Search autocomplete places or addresses. Is a custom view that can be used inside or outside of the goolgemap. Note: It has search in different providers of location services among them: GoogleMap Nominatim LocationIQ MapQuest Bing Maps Mapbox Others B4A:
This is more for interest than of practical use here, and I suspect it's already included within Nominatim already, but... in Australia we have the absolutely wonderful open and free government data:
Geoscape's Geocoded National Address File (G-NAF) contains the details (including latitude and longitude) of every physical address in Australia.