5

我正在尝试将我的应用程序waze集成。

有谁知道我如何调用位智并发送坐标?

我没有找到任何关于它的 API 或其他信息..

4

1 回答 1

8
- (void) navigateToLatitude:(double)latitude
                  longitude:(double)longitude
{
   if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"waze://"]]) {
      //Waze is installed. Launch Waze and start navigation
      NSString *urlStr = [NSString stringWithFormat:@"waze://?ll=%f,%f&navigate=yes", latitude, longitude];
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
   } else {
      //Waze is not installed. Launch AppStore to install Waze app
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/us/app/id323229106"]];
   }
}
于 2013-02-20T12:37:00.987 回答