我有一个小应用程序,提供当前位置:经度和纬度。 现在我必须浏览谷歌地图的经度和纬度。 请建议我该怎么做。


当前回答

简单说http://www.google.com/maps/place/lat,lng格式

示例url:

http://www.google.com/maps/place/30.364124,48.227034

其他回答

打开谷歌地图并显示URL方案位置和位置引脚

UIApplication.shared.openURL(URL(string:"https://maps.google.com/?q=\(dicLocation.stringValueForKey("latitude")),\(dicLocation.stringValueForKey("longitude")),15z")!)

在谷歌地球程序中找到您的位置,并单击“在谷歌地图中查看”图标。浏览器中的URL栏将显示您需要的URL。

简单说http://www.google.com/maps/place/lat,lng格式

示例url:

http://www.google.com/maps/place/30.364124,48.227034

打开以下url,并显示经纬度和缩放级别。

https://maps.google.com/?q=23.22,88.32&z=8

最好的方法是使用q参数,这样它就会显示带有标记点的地图。如:

https://maps.google.com/?q=<lat>,<lng>