简体   繁体   English

xcode和waze集成

[英]xcode and waze integration

I'm trying to integrate my app with waze . 我正在尝试将我的应用程序waze集成。

Anyone know how can I call waze and send the coordinates? 任何人都知道如何调用waze并发送坐标?

I didn't find any API or other information about it.. 我没有找到任何关于它的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"]];
   }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM