【发布时间】:2014-03-03 07:37:46
【问题描述】:
我想绘制从当前位置到目的地位置的路线。
我正在使用以下代码。
if ([[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"comgooglemaps://"]]) {
NSString *urlString = [NSString stringWithFormat:@"comgooglemaps://?saddr=%f,%f&daddr=%@,%@&directionsmode=driving",
appDelegate.myLocation.coordinate.latitude,
appDelegate.myLocation.coordinate.longitude,
self.objPlace.strLatitude,
self.objPlace.strLongitude];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: urlString]];
}
结果图片 ---------------------------------- 预期图片
comgooglemaps://?saddr=23.033646,72.559139&daddr=23.033018,72.557025&directionsmode=driving
注意:我要求不在应用程序内的原生谷歌应用程序
但它没有显示路线?
【问题讨论】:
标签: ios objective-c google-maps