2016-08-24 73 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> 

非常感谢所有谁评论!