2016-08-24 75 views
1

測試頁位於http://hmcc1.com/Contact_TEST.htm谷歌地圖嵌入:地址嵌入地圖上正確的 - 不正確的方向

我曾經嘗試都place_id和實際地址。如另一個Q & A(Google Maps Embed displaying incorrect address on directions)中所述,返回無效的參數錯誤。

無論我使用place_id還是地址,當點擊路線時,錯誤的地址都顯示在路線頁面上。

這裏是測試頁面代碼:

<iframe width="500" height="640" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?q=3060+N+Kennicott+Ave,+Arlington+Heights,[email protected],-87.994873&key=AIzaSyA42PChU9T0qV5kw-ikHHUv4yarQhFFo9U" allowfullscreen></iframe> 

我會的任何援助表示感謝。先謝謝你。

+0

對我來說,它適用於你的測試頁面。顯示相同的地址,您可以在點擊路線時看到您的測試頁面。 – Fuzzzzel

+0

我在方向請求中獲得「3050 North Kennicott Avenue,Arlington Heights,IL 60004」(儘管它看起來像同一座建築......)。 – geocodezip

+0

@Fuzzzzel真的嗎?查看它的其他人在嵌入式地圖上看到3060,並在點擊路線圖後顯示地圖上的3050。感謝您的檢查。 – kathi

回答

0

我將離開測試頁面以防萬一有人提出修復,或者@geocodezip說,也許API有錯誤並且會(有一天)被修復。對於live page,我最終使用了路線模式。這並不是我想要的,但至少它沒有給出錯誤的地址。它對移動用戶來說很好。

我能夠使用的代碼完全一樣產生由Google Maps Embed Quick Start page

<iframe width="500" height="500" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/directions?origin=Current%20Location&destination=place_id:ChIJJ2uA_ly7D4gRRDjYtPvR62U&mode=driving&key=AIzaSyA42PChU9T0qV5kw-ikHHUv4yarQhFFo9U" allowfullscreen></iframe> 

非常感謝所有誰評論!