简体   繁体   中英

Get a google places autocomplete status

如何在谷歌地方获取状态自动完成搜索..如果我在谷歌中键入一些东西自动完成文本框,如果地方不存在那么如何发出警告该地方无效?

I think you can use something like this.

var displaySuggestions = function(predictions, status) {
  if (status != google.maps.places.PlacesServiceStatus.OK) {
    alert(status);
    return;
  }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM