[MAPSME-6519] [ios] Added transport routing errors support.

This commit is contained in:
Ilya Grechuhin 2018-02-08 18:04:51 +03:00 committed by Vladimir Byko-Ianko
parent 2de1eca620
commit eb18cc4fa4
3 changed files with 24 additions and 2 deletions

View file

@ -72,8 +72,8 @@
case routing::IRouter::EndPointNotFound: return [MWMDefaultAlert endPointNotFoundAlert];
case routing::IRouter::PointsInDifferentMWM: return [MWMDefaultAlert pointsInDifferentMWMAlert];
case routing::IRouter::RouteNotFound:
case routing::IRouter::TransitRouteNotFoundNoNetwork:
case routing::IRouter::TransitRouteNotFoundTooLongPedestrian:
case routing::IRouter::TransitRouteNotFoundNoNetwork: return [MWMDefaultAlert routeNotFoundNoPublicTransportAlert];
case routing::IRouter::TransitRouteNotFoundTooLongPedestrian: return [MWMDefaultAlert routeNotFoundTooLongPedestrianAlert];
case routing::IRouter::RouteNotFoundRedressRouteError:
case routing::IRouter::InconsistentMWMandRoute: return [MWMDefaultAlert routeNotFoundAlert];
case routing::IRouter::RouteFileNotExist:

View file

@ -3,6 +3,8 @@
@interface MWMDefaultAlert : MWMAlert
+ (instancetype)routeNotFoundAlert;
+ (instancetype)routeNotFoundNoPublicTransportAlert;
+ (instancetype)routeNotFoundTooLongPedestrianAlert;
+ (instancetype)routeFileNotExistAlert;
+ (instancetype)endPointNotFoundAlert;
+ (instancetype)startPointNotFoundAlert;

View file

@ -45,6 +45,26 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
statisticsEvent:@"Route File Not Exist Alert"];
}
+ (instancetype)routeNotFoundNoPublicTransportAlert
{
return [self defaultAlertWithTitle:L(@"transport_not_found")
message:nil
rightButtonTitle:L(@"ok")
leftButtonTitle:nil
rightButtonAction:nil
statisticsEvent:@"transport_not_found"];
}
+ (instancetype)routeNotFoundTooLongPedestrianAlert
{
return [self defaultAlertWithTitle:L(@"transport_not_found_connection")
message:nil
rightButtonTitle:L(@"ok")
leftButtonTitle:nil
rightButtonAction:nil
statisticsEvent:@"transport_not_found_connection"];
}
+ (instancetype)locationServiceNotSupportedAlert
{
return [self defaultAlertWithTitle:L(@"current_location_unknown_error_title")