diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm index e15526435d..484db61ce4 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm @@ -20,6 +20,7 @@ @property(weak, nonatomic) IBOutlet UIView * bicycle; @property(weak, nonatomic) IBOutlet UIView * contentView; @property(weak, nonatomic) IBOutlet UIView * pedestrian; +@property(weak, nonatomic) IBOutlet UIView * publicTransport; @property(weak, nonatomic) IBOutlet UIView * taxi; @property(weak, nonatomic) IBOutlet UIView * vehicle; @@ -43,6 +44,9 @@ { [self addProgress:self.vehicle imageName:@"ic_car" routerType:MWMRouterTypeVehicle]; [self addProgress:self.pedestrian imageName:@"ic_pedestrian" routerType:MWMRouterTypePedestrian]; + [self addProgress:self.publicTransport + imageName:@"ic_train" + routerType:MWMRouterTypePublicTransport]; [self addProgress:self.bicycle imageName:@"ic_bike" routerType:MWMRouterTypeBicycle]; [self addProgress:self.taxi imageName:@"ic_taxi" routerType:MWMRouterTypeTaxi]; } @@ -121,6 +125,7 @@ { case MWMRouterTypeVehicle: routerTypeString = kStatVehicle; break; case MWMRouterTypePedestrian: routerTypeString = kStatPedestrian; break; + case MWMRouterTypePublicTransport: routerTypeString = kStatPublicTransport; break; case MWMRouterTypeBicycle: routerTypeString = kStatBicycle; break; case MWMRouterTypeTaxi: routerTypeString = kStatTaxi; break; } diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPadRoutePreview.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPadRoutePreview.xib index 42787696d6..4ac2a09bb8 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPadRoutePreview.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPadRoutePreview.xib @@ -1,16 +1,16 @@ - + - - + + HelveticaNeue HelveticaNeue-Medium @@ -55,66 +55,71 @@ - + - + - - - - - - - - - + + - + - - - + + + + + + + + + + - + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + + + + + - + - - + + + @@ -426,6 +431,7 @@ + diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPhoneRoutePreview.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPhoneRoutePreview.xib index 676cd88e11..54ec6e0803 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPhoneRoutePreview.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPhoneRoutePreview.xib @@ -1,13 +1,18 @@ - + - + + + + HelveticaNeue + + @@ -49,10 +54,10 @@ - + - + @@ -60,47 +65,58 @@ - - - - - - - - - - + - - - - + + + + + + + + + + - + - - - - - - - + + + + + + + - - + + + + + + + - - - - + + + + + + + + + + + + + @@ -110,7 +126,9 @@ - + + + @@ -133,6 +151,7 @@ + diff --git a/iphone/Maps/Common/Statistics/StatisticsStrings.h b/iphone/Maps/Common/Statistics/StatisticsStrings.h index cbdf5e109c..139ad9b779 100644 --- a/iphone/Maps/Common/Statistics/StatisticsStrings.h +++ b/iphone/Maps/Common/Statistics/StatisticsStrings.h @@ -204,6 +204,7 @@ static NSString * const kStatProblem = @"Problem"; static NSString * const kStatProfile = @"Profile"; static NSString * const kStatProgress = @"Progress"; static NSString * const kStatProvider = @"Provider"; +static NSString * const kStatPublicTransport = @"Public Transport"; static NSString * const kStatPushReceived = @"Push received"; static NSString * const kStatRB = @"RB"; static NSString * const kStatRate = @"Rate"; diff --git a/iphone/Maps/Core/Location/MWMLocationManager.mm b/iphone/Maps/Core/Location/MWMLocationManager.mm index b364334861..24dda957cc 100644 --- a/iphone/Maps/Core/Location/MWMLocationManager.mm +++ b/iphone/Maps/Core/Location/MWMLocationManager.mm @@ -335,6 +335,7 @@ void setPermissionRequested() switch ([MWMRouter type]) { case MWMRouterTypeVehicle: manager.geoMode = GeoMode::VehicleRouting; break; + case MWMRouterTypePublicTransport: case MWMRouterTypePedestrian: manager.geoMode = GeoMode::PedestrianRouting; break; case MWMRouterTypeBicycle: manager.geoMode = GeoMode::BicycleRouting; break; case MWMRouterTypeTaxi: break; diff --git a/iphone/Maps/Core/Routing/MWMCoreRouterType.h b/iphone/Maps/Core/Routing/MWMCoreRouterType.h index 812d0170b4..084fd27841 100644 --- a/iphone/Maps/Core/Routing/MWMCoreRouterType.h +++ b/iphone/Maps/Core/Routing/MWMCoreRouterType.h @@ -8,6 +8,7 @@ static inline routing::RouterType coreRouterType(MWMRouterType type) { case MWMRouterTypeVehicle: return routing::RouterType::Vehicle; case MWMRouterTypePedestrian: return routing::RouterType::Pedestrian; + case MWMRouterTypePublicTransport: return routing::RouterType::Transit; case MWMRouterTypeBicycle: return routing::RouterType::Bicycle; case MWMRouterTypeTaxi: return routing::RouterType::Taxi; } @@ -18,7 +19,7 @@ static inline MWMRouterType routerType(routing::RouterType type) switch (type) { case routing::RouterType::Vehicle: return MWMRouterTypeVehicle; - case routing::RouterType::Transit: // TODO: AddTransitType + case routing::RouterType::Transit: return MWMRouterTypePublicTransport; case routing::RouterType::Pedestrian: return MWMRouterTypePedestrian; case routing::RouterType::Bicycle: return MWMRouterTypeBicycle; case routing::RouterType::Taxi: return MWMRouterTypeTaxi; diff --git a/iphone/Maps/Core/Routing/MWMRouter.mm b/iphone/Maps/Core/Routing/MWMRouter.mm index 525c5fe1f6..34e10c5761 100644 --- a/iphone/Maps/Core/Routing/MWMRouter.mm +++ b/iphone/Maps/Core/Routing/MWMRouter.mm @@ -88,6 +88,7 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType) switch ([self type]) { case MWMRouterTypeVehicle: + case MWMRouterTypePublicTransport: case MWMRouterTypeTaxi: return NO; case MWMRouterTypePedestrian: case MWMRouterTypeBicycle: return GetFramework().GetRoutingManager().HasRouteAltitude(); diff --git a/iphone/Maps/Core/Routing/MWMRouterType.h b/iphone/Maps/Core/Routing/MWMRouterType.h index 69988fcd2e..b3a3e8357d 100644 --- a/iphone/Maps/Core/Routing/MWMRouterType.h +++ b/iphone/Maps/Core/Routing/MWMRouterType.h @@ -1,6 +1,7 @@ typedef NS_ENUM(NSUInteger, MWMRouterType) { MWMRouterTypeVehicle, MWMRouterTypePedestrian, + MWMRouterTypePublicTransport, MWMRouterTypeBicycle, MWMRouterTypeTaxi }; diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train.imageset/Contents.json new file mode 100644 index 0000000000..4b6df94329 --- /dev/null +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_train.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train.imageset/ic_train.pdf b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train.imageset/ic_train.pdf new file mode 100644 index 0000000000..c5c1008122 Binary files /dev/null and b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train.imageset/ic_train.pdf differ diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_highlighted.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_highlighted.imageset/Contents.json new file mode 100644 index 0000000000..f35b3202d2 --- /dev/null +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_highlighted.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_train_highlighted.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_highlighted.imageset/ic_train_highlighted.pdf b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_highlighted.imageset/ic_train_highlighted.pdf new file mode 100644 index 0000000000..72e0199f32 Binary files /dev/null and b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_highlighted.imageset/ic_train_highlighted.pdf differ diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_selected.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_selected.imageset/Contents.json new file mode 100644 index 0000000000..3f7b38a259 --- /dev/null +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_selected.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_train_selected.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_selected.imageset/ic_train_selected.pdf b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_selected.imageset/ic_train_selected.pdf new file mode 100644 index 0000000000..2d7d369e17 Binary files /dev/null and b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_train_selected.imageset/ic_train_selected.pdf differ