通过点击按钮导航到谷歌地图应用程序,那里显示从一个位置到另一个位置的方向。 这里是我在按钮我们应该如何将自定义UIButton放在Google地图应用中?
@IBAction func movetonextclass() {
if UIApplication.shared.canOpenURL(URL(string: "comgooglemaps://")!) {
let googleMapUrlString: String = "comgooglemaps://?saddr=&daddr=\(CDouble(startLat)),\(CDouble(startLong))&mode=driving"
UIApplication.shared.openURL(URL(string: googleMapUrlString)!)
}
else {
let googleMapUrlString: String = "http://maps.google.com/maps?f=d,&daddr=\(CDouble(stopLat)),\(CDouble(stopLong))"
UIApplication.shared.openURL(URL(string: googleMapUrlString)!)
}
}
写道,现在我想在屏幕上显示一个自定义的UIButton的代码。
如果我点击那个按钮,我应该导航到我自己的应用程序 我应该如何在谷歌地图屏幕上放一个按钮? 可以在任何一个可以帮助我解决这个
在应用程序内部你可以做到这一点,你不能在外面 –
你不能添加或修改其他应用程序,但你可以自己在你的应用程序中使用相同的功能。 – CodeChanger
@CodeChanger我们可以在我们的应用程序的两个位置之间显示路线(它应该像轮到转弯)? 如果是的话,你能告诉我如何请。我会很感激你 –