Several highlights in google maps embed API

2019-08-09 22:24发布

问题:

I would like to add several highlight places using the Embed API of Google Maps in an Iframe like this:

<iframe src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBstlDO5AXkMg6xOjrkTJliYabsODR2vYA&q=Harvard+University,Parque+explora" width="100%" height="500" frameborder="0" style="border:0" allowfullscreen></iframe>

How can I add several locations to the q parameter?

Thx!

回答1:

You would have to use mymap, or the Google Maps API to do it. Embed API does not support multiple markers.

For using My Map, you need to set your maps to public before you can embed it onto your site.

To generate the embed url, it is under the 3... next to the share button

If you decided to do it with the API, you might want to reference to the Markers part of the documentation.