开发者

Google Autocomplete service for places (cities, countries, not establishment such as business)

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜