【发布时间】:2011-06-26 17:23:07
【问题描述】:
我正在使用此代码从我的应用程序运行 maps.app。
NSString* urlStr = [NSString stringWithFormat: @"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f", s_lat, s_long, d_lat, d_long];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString:urlStr]];
问题是我没有设法获得当前位置。 我想要这样的东西:
poi1.url = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=Current Location&daddr=%f,%f",lat,lon];
【问题讨论】:
-
你为什么不尝试在你的应用中展示一个 MapView 呢?
-
因为我使用的是第 3 方 sdk,它只允许我使用 url。