使用网址链接到带有标记的Google地图 [英] Use a URL to link to a Google map with a marker on it

查看:112
本文介绍了使用网址链接到带有标记的Google地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在特定位置用特定位置上的标记链接到Google地图。



很容易链接到某个位置:

  http://maps.google.com/?ll=XX.XXXX,XX.XXXX 

但是,我该如何在该点放置标记?最好带一点我自己的文字,但这只是一个奖励。



2017 - Google已发布关于此的文档,请参阅新的接受答案:https://stackoverflow.com/a/44477650/359135

解决方案

2017年5月,Google推出了官方的Google Maps URLs文档。 Google Maps URL引入了可在您的应用程序中使用的通用跨平台语法。



查看以下文档:

https://developers.google.com/maps/documentation/urls / b>

您可以在搜索,路线,地图和街景模式中使用网址。



例如,要在指定位置显示标记,您可以使用以下URL:

https://www.google.com/maps /search/?api=1&query=36.26577,-92.54324



有关更多详情,请阅读上述文件。



您也可以在Google中为此API提交功能请求问题跟踪器



希望这有助于!


I want to link to google maps at a particular location with a marker on a particular point.

It's easy to link to a location:

http://maps.google.com/?ll=XX.XXXX,XX.XXXX

But how do I drop a marker at that point too? preferably with a bit of my own text but that's just a bonus.

2017 - Google has released documentation on this see new accepted answer: https://stackoverflow.com/a/44477650/359135

解决方案

In May 2017 Google launched the official Google Maps URLs documentation. The Google Maps URLs introduces universal cross-platform syntax that you can use in your applications.

Have a look at the following document:

https://developers.google.com/maps/documentation/urls/guide

You can use URLs in search, directions, map and street view modes.

For example, to show the marker at specified position you can use the following URL:

https://www.google.com/maps/search/?api=1&query=36.26577,-92.54324

For further details please read aforementioned documentation.

You can also file feature requests for this API in Google issue tracker.

Hope this helps!

这篇关于使用网址链接到带有标记的Google地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆