ios - 通过google maps api查找路线时添加地址注释

标签 ios google-maps mapkit

我正在使用谷歌地图获取从一个地方到另一个地方的路线。这是代码

NSString *mapAPIString = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f",
    sourceAddress.coordiate.latitude,
    sourceAddress.coordiate.longitude,
    destAddress.coordiate.latitude,
    destAddress.coordiate.longitude,
    ];
NSURL *url = [[NSURL alloc] initWithString:mapAPIString];
[[UIApplication sharedApplication] openURL:url];

代码运行完美。但是这两个地址在 iOS map 应用程序中都被标记为“未知地址”。是否可以为每个地址添加自定义标题?

最佳答案

iOS 6 仍在 NDA 下,但如果您有权访问文档,请查看它们,您可能会找到有关此问题的有用信息。

关于ios - 通过google maps api查找路线时添加地址注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7537159/

相关文章:

ios - 不需要导入 MapKit.framework?

ios - 64位安全性和uint32_t

ios - 如何删除 NSMutableArray 中的重复字段,其中包括 Swift 3 中的 NSDictionary

java - 将 HashMap 添加到标记以显示图像不会返回该特定标记的正确图像

google-maps - 如何使用flutter在谷歌地图中添加标记?

ios - MKPolyLineRenderer 改变颜色而不移除覆盖

android - 是否可以实现从网站到 native 应用程序的深度链接?

ios - 如何全屏显示图像的 ScrollView ?

google-maps - 获取国家/州的城市名称

iPhone:route-me 项目的注释 View (如 MKAnnotationView)?