单击 Google 控制按钮时在 Google 地图应用程序中打开.. Swift 4
Open in Google Maps App when clicking on Google control button.. Swift 4
我在 swift 4 中使用 google 地图 SDK,一切都很完美,但是..
我需要允许用户点击 Google 控制按钮,如下图所示:
Google control button image
我的问题是如何将标记从我的应用程序地图中删除到具有特定坐标的 google 地图应用程序。
谢谢
据我所知,您无法覆盖该按钮。
您最好使用其他按钮打开 url。根据 https://developer.apple.com/documentation/uikit/uiapplication/1648685-open
然后您可以将标记坐标作为查询包含在 url 中,这将向地图添加标记。
例如。 https://www.google.com/maps/search/?api=1&query=-33.830114,151.219235
这是根据:https://developers.google.com/maps/documentation/urls/guide
我在 swift 4 中使用 google 地图 SDK,一切都很完美,但是.. 我需要允许用户点击 Google 控制按钮,如下图所示:
Google control button image
我的问题是如何将标记从我的应用程序地图中删除到具有特定坐标的 google 地图应用程序。 谢谢
据我所知,您无法覆盖该按钮。
您最好使用其他按钮打开 url。根据 https://developer.apple.com/documentation/uikit/uiapplication/1648685-open
然后您可以将标记坐标作为查询包含在 url 中,这将向地图添加标记。 例如。 https://www.google.com/maps/search/?api=1&query=-33.830114,151.219235
这是根据:https://developers.google.com/maps/documentation/urls/guide