I need to offer in my application the ability to predict (auto suggest) places, as user typing. I know that Google have such service. The iss开发者_如何学Goue is, Google Autocomplete service predict places (business) while I need to autocomplete, places, such as cities, countries (not establishment such as business). Does Google or others offer this service?
thanks,,
If you are talking about Javascript:
Link to Docs
Yes, set the types to geocode and it will only give suggestions to places, and not businesses.
var acOptions = {
bounds: ACdefaultBounds,
types: ['geocode']
};
var input = document.getElementById('searchTextField');
var autocomplete = new google.maps.places.Autocomplete(input, acOptions);
精彩评论