我尝试将google map embed api添加到我的网站。就像文档一样,如下所示
<iframe
width="600"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=API_KEY
&q=Space+Needle,Seattle+WA" allowfullscreen>
</iframe>
但是,我不知道如何添加标记来嵌入api。有人可以帮助我吗?
答案 0 :(得分:0)
I just had this issue. I tried the "directions" for a set of markers, seems to work. In my case it was an itinerary so it was reasonable.
iframe width="600" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/directions?key=my key here&origin=45.476112,-73.823152&destination=45.800000,-73.823298&mode=walking&waypoints=45.47611153,-73.82315248|45.56712414,-73.82331277|45.6,-73.82318975|45.7,-73.83250646|45.8,-73.82329847&center=45.47611153,-73.82315248&zoom=14" allowfullscreen=""></iframe>
If you happen to know how to get it to go fullscreen, I'd be grateful.