2016-07-05 90 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