2

我面臨谷歌地點自動完成API問題。它沒有顯示下拉菜單。我從API獲得響應。它只是沒有渲染或追加在視圖內的.pac容器。我試着改變.pac-container的css。但仍然沒有運氣。我只是使用谷歌(Here)提供的代碼示例中提供的相同代碼。我不知道什麼是錯的。請幫助我。谷歌地方API沒有顯示自動完成下拉菜單

測試環節:http://webberspoint.com/test.html

+0

我試着從谷歌地方API和其工作沒有任何問題相同的代碼。你是否自己對javascript和html做了任何更改? –

+0

我的解決方案是否解決了您的問題? –

+0

除了放入我的鑰匙之外,我沒有做任何改變。我也檢查了控制檯。 API已啓用 – user3300034

回答

3

我發現你的問題的解決方案。當我在自動完成輸入中撥打電話時,正在對Google地方的自動填充進行調用。但是,響應返回一個錯誤,說[3,null,null,"This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: https://console.developers.google.com/apis/library?project=_ Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/places_backend?project=_ For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key"])。所以請檢查,要麼你沒有激活這個API或你使用的這個API密鑰是不正確的。首先檢查一下,可能是你的API沒有打開。並確保您爲Google Maps JavaScript API生成您的API。我還添加了我收到的錯誤的快照。 Error i received while testing you auto-complete

相關問題