//导航
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"baidumap://map/"]]) {
//百度app导航
NSString *urlstr = [NSString stringWithFormat:@"baidumap://map/direction?origin=%f,%f&destination=%f,%f&mode=driving&src=iHope", _newCoordinate.latitude, _newCoordinate.longitude, _destLocation.latitude, _destLocation.longitude];
NSLog(@"%@", urlstr);
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlstr]];
}
else {
//系统地图导航
MKMapItem *currentLocation = [MKMapItem mapItemForCurrentLocation];
MKMapItem *toLocation = [[MKMapItem alloc] initWithPlacemark:[[MKPlacemark alloc] initWithCoordinate:_destLocationaddressDictionary:nil]];
toLocation.name = self.destName;
[MKMapItem openMapsWithItems:@[currentLocation, toLocation]
launchOptions:@{MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving,MKLaunchOptionsShowsTrafficKey: [NSNumber numberWithBool:YES]}];
}