ios - Google Maps URL Scheme 不显示标记

标签 ios objective-c google-maps

我使用 Google Maps URL Scheme 在 iOS 上打开 Google Map 应用程序,我有 schema:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"comgooglemaps://?center=35.6653,139.6959&zoom=16&views=traffic&mapmode=standard"]]; 

但是当我运行应用程序时,结果没有在位置 (35.6653,139.6959) 显示标记。

enter image description here

如何显示标记?

最佳答案

当你在 url 中传递纬度和经度时,你可以像 as 一样显示标记

 [[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"http://maps.google.com/maps?q=35.6653,139.6959"]];

关于ios - Google Maps URL Scheme 不显示标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27222552/

相关文章:

ios - UITextField 占位符文本属性不断重置

objective-c - 为什么 NSNumber 是不可变的?

ios - MBProgressHUD 不再与 iOS 8 一起旋转

javascript - 谷歌地图 - 将 InfoWindows 附加到数组中的多边形

ios - 在 XCTest 用例中处理 CLLocationManager 授权请求

ios - IOS 上的 Swizzling 低级 TCP 方法

javascript - 如何在 Google map 上创建自定义交互区域?

android - Google map SDK 地理编码

ios - Swift - 创建屏幕上和屏幕外的 UITextView 内容图像

iphone - 如何以编程方式判断 IBAction 是否已被代码或用户操作调用