Documentation on Bing Maps autosuggest service can be found here: https://learn.microsoft.com/en-us/bingmaps/rest-services/autosuggest
You can use this with Androids AutoCompleteTextView to create a suggestion UI. You will retrieve the suggestions asynchronously from the above service. Here are a few good samples:
https://www.truiton.com/2018/06/android-autocompletetextview-suggestions-from-webservice-call/
How to implement autocompletetextview in Android Studio with an API call?
This service does not return coordinates. This is done so that it isn't used as a replacement for the geocoding service and thus allows them to make this a lower cost service. When a suggestion is selected by the user, you will need to make a single call to a geocoder to get the coordinates of the formattedAddress
, then you can use that to display a marker on the map. I recommend setting the result limit to 1 since you only want to top result.
In summary;
- Use addTextChangedListener event of AutoCompleteTextView to retrieve suggestions from the autosuggest service.
- Use setOnItemClickListener event of AutoCompleteTextView to retrieve the selection from the user, and pass the
formattedAddress
value into the geocoding service.
- Use the coordinates from the geocoder response to create a marker and add to the map.