使用网址链接到带有标记的Google地图

使用网址链接到带有标记的Google地图

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

问题描述

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



很容易链接到某个位置:

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

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



2017 - Google已发布关于此的文档,请参阅新的接受答案:

解决方案

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



查看以下文档:



希望这有助于!


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地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 17:56