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

有人知道我该如何叫位和发送坐标吗?

我没有找到任何API或与此有关的其他信息。

最佳答案

- (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"]];
   }
}

关于ios - xcode和位智整合,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10688290/

10-09 02:37