单击链接后在Google地图应用中显示特定位置

时间:2018-06-06 10:55:33

标签: ios swift google-maps

我想点击我的iOS(11.3)应用中的按钮,该应用会在特定位置打开谷歌地图。

我有 id place_id ,但我不知道如何使用它们。

这是我构建的链接,但无法打开

world.location = "comgooglemaps://?q=place_id:\(place.1["place_id"].stringValue)&center=" + latlong;

GoogleMaps推出但它回复了#34;没有结果"为我的place_id。此外, place_id:在应用的搜索栏中可见。

这就是我尝试打开链接的方式

@IBAction func search(_ sender: UIButton) {
   UIApplication.shared.open(URL(string : world.location)!)
}

1 个答案:

答案 0 :(得分:0)

您好安藤通过以下链接。我想你会知道答案,你的网址不对。 网址 - How do i open Google Maps for directions using coordinates on the iphone