我正在使用谷歌地图获取从一个地方到另一个地方的路线。这是代码
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/