首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >xcode和waze集成

xcode和waze集成
EN

Stack Overflow用户
提问于 2012-05-21 15:39:01
回答 1查看 3.4K关注 0票数 5

我正在尝试将我的应用程序瓦兹集成起来。

有人知道我怎么打电话给waze并发送坐标吗?

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-02-20 12:37:00

代码语言:javascript
复制
- (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"]];
   }
}
票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10688290

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档