getQueryPredictions Api无法获取格式地址的地址

时间:2018-11-26 07:03:32

标签: google-maps google-places-api

我正在使用AutocompeteSerive从Google getQueryPredictions API中获取地址。

这是自动完成输入框的初始化:

this.autoComp = new google.maps.places.AutocompleteService({
    componentRestrictions: { 'country': 'in' }
});

this.autoComp.getQueryPredictions({ input: value }, (results, status) => {
    console.log(status);
    if (status == google.maps.places.PlacesServiceStatus.OK) {}
})

步骤1:

用户输入班加罗尔

为Google Api选择以下谓词:

  

不。印度,班加罗尔,班加罗尔,印度,卡纳塔克邦,迈萨鲁路15号,近庙,班查穆克·加纳帕蒂·曼迪尔,印度

将此地址重新发送到相同的api以进行用户确认: 零结果

任何解决方案吗?

注意:尝试向api下面的同一个地址发送两次相同的地址,..((p

https://maps.googleapis.com/maps/api/geocode/xml?address=No.%2015,%20Mysuru%20Road,%20Near,%20Temple,%20Pancha%20Mukhi%20Ganapati%20Mandir,%20Kengeri,%20Bengaluru,%20Karnataka%20560060,%20India&sensor=false&key=xxxxxxxxxxxx

0 个答案:

没有答案