Html 多个标记谷歌地图嵌入 API

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25970940/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 02:44:54  来源:igfitidea点击:

multiple markers google maps embed API

htmlgoogle-mapsmapsgoogle-maps-embed

提问by yuriy.stos

I need to place several markers which specified by coordinates on embed map. I know how to do it for one marker, but don't know for multiple.

我需要在嵌入地图上放置几个由坐标指定的标记。我知道如何为一个标记做到这一点,但不知道如何为多个标记做到这一点。

<iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
        src="https://www.google.com/maps/ms?msid=204293175747830583907.0005022420ef3bca6a816&msa=0&ie=UTF8&t=m&ll=40.79042,-73.945541&spn=0.462677,1.056747&output=embed"></iframe>

回答by wildavies

You cannot do this with the google maps iframe embed.

你不能用谷歌地图 iframe 嵌入来做到这一点。

You either need to do it with Google Maps Map Maker (http://www.google.com/maps/mm) or you need to use the Google Maps API (https://developers.google.com/maps/).

您要么需要使用 Google Maps Map Maker ( http://www.google.com/maps/mm)来执行此操作,要么需要使用 Google Maps API ( https://developers.google.com/maps/)。

The downside of the Google Maps Map Maker is you need to manually go back and recreate your map any time you want to make changes.

Google Maps Map Maker 的缺点是您需要在任何时候进行更改时手动返回并重新创建地图。

I would suggest using the Google Maps API.

我建议使用 Google Maps API。

This is a great little tutorial that shows you a simple Map with multiple markers using the Google Maps API - http://wrightshq.com/playground/placing-multiple-markers-on-a-google-map-using-api-3/

这是一个很棒的小教程,它使用 Google Maps API 向您展示了一个带有多个标记的简单地图 - http://wrightshq.com/playground/placing-multiple-markers-on-a-google-map-using-api-3 /