xcode 和 Waze 集成 [英] xcode and waze integration
本文介绍了xcode 和 Waze 集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将我的应用与waze集成.
I'm trying to integrate my app with waze.
有谁知道我如何调用 waze 并发送坐标?
Anyone know how can I call waze and send the coordinates?
我没有找到任何 API 或其他相关信息..
I didn’t find any API or other information about it..
推荐答案
- (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"]];
}
}
这篇关于xcode 和 Waze 集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文