【问题标题】:Google embedded map not showing route with selected options (eg. avoid toll/highway)谷歌嵌入式地图未显示带有所选选项的路线(例如,避免收费/高速公路)
【发布时间】:2015-04-14 09:38:30
【问题描述】:
在创建带有选择的选项(例如避开收费公路或高速公路)的地图时,嵌入式地图会显示最快的方式,而不是之前计算的路线。
是否有任何键/值对添加到 iframe 的源以打开此选项? API 有这个选项,但在这里不起作用:...&avoid=tolls|highways
示例:https://goo.gl/maps/cyY4y
提前致谢!
编辑:
嵌入时,选项被添加到源但被忽略。如果添加了适当的 API 密钥,并且这些选项与 API 选项一起添加,则它可以工作。
谢谢维尔玛!
【问题讨论】:
标签:
google-maps
embed
options
【解决方案1】:
这对我有用
https://www.google.com/maps/embed/v1/directions?
origin=2151+Fót,+Fehérkő+utca+2,+Hungary
&destination=Brezova-Gokartland,+Visonta,+Brezova+tanya+3271,+Hungary
&key=MY_KEY&avoid=tolls|highways