2016-07-05 83 views
-1

我下面简单的搜索盒例子在这里:https://developers.google.com/maps/documentation/javascript/examples/places-searchbox#try-it-yourself调试搜索盒学位结果

一切都是正确加载,但是当我在搜索框键入,没有结果被列出。我可以在页面底部看到的.pac容器,当我在搜索盒型,的.pac容器的变化来自:

<div class="pac-container pac-logo" style="display: none;"></div> 

到:

<div class="pac-container pac-logo" style="display: none; width: 298px; position: absolute; left: 691px; top: 484px;"></div> 

这都说明它响应,但我认为它仍然是“display:none”,因为没有结果被返回,div仍然是空的。

有谁知道我可以如何调试SearchBox响应?我不知道如何检查为什么没有结果被返回。

+0

你生成一个API密钥和在此项目上启用了Maps API JS和Places API? – kaskader

+0

我有完全相同的问题!我只启用了Google Maps JavaScript API。启用Places API解决了问题! – Silentdrummer

回答

0