在此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;
虽然该代码无效。任何想法,我在那里错误地使用该代码或知道更好的方法?
答案 0 :(得分:1)
看起来您使用的是静态地图网址但是您有embed map?
https://www.google.com/maps/embed/v1/directions
?key=API_KEY
&origin=
&destination=