单击按钮突出显示地图标记(Gmaps) - 如何?

时间:2015-03-16 20:41:19

标签: javascript google-maps

在此page我需要"获取路线,"按钮突出显示地图上已有的三个点/地图标记之一。到目前为止,我有以下按钮/ img ....



<a href="https://maps.googleapis.com/maps/api/staticmap?center=" + 37.7029 + "," + -121.9335 + "&zoom=13&size=300x300&sensor=false"><img src="images/get-directions.jpg" alt="get directions"></a><br>
&#13;
&#13;
&#13;

虽然该代码无效。任何想法,我在那里错误地使用该代码或知道更好的方法?

1 个答案:

答案 0 :(得分:1)

看起来您使用的是静态地图网址但是您有embed map

https://www.google.com/maps/embed/v1/directions
  ?key=API_KEY
  &origin=
  &destination=
相关问题