diff --git a/iphone/Maps/Bridging-Header.h b/iphone/Maps/Bridging-Header.h
index 05fd69083e..0ef14222fd 100644
--- a/iphone/Maps/Bridging-Header.h
+++ b/iphone/Maps/Bridging-Header.h
@@ -24,6 +24,7 @@
#import "MWMNoMapsViewController.h"
#import "MWMPlacePageButtonsProtocol.h"
#import "MWMPlacePageCellUpdateProtocol.h"
+#import "MWMPlacePageTaxiProvider.h"
#import "MWMPushNotifications.h"
#import "MWMRouter.h"
#import "MWMSearchItemType.h"
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.h
deleted file mode 100644
index 18a0c25b7b..0000000000
--- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.h
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace taxi
-{
-struct Product;
-}
-
-@interface MWMTaxiPreviewCell : UICollectionViewCell
-
-- (void)configWithProduct:(taxi::Product const &)product;
-
-@end
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.mm
deleted file mode 100644
index 9b32a9319b..0000000000
--- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.mm
+++ /dev/null
@@ -1,38 +0,0 @@
-#import "MWMTaxiPreviewCell.h"
-#import "SwiftBridge.h"
-
-#include "partners_api/taxi_provider.hpp"
-
-#include "base/string_utils.hpp"
-
-@interface MWMTaxiPreviewCell ()
-
-@property(weak, nonatomic) IBOutlet UIImageView * icon;
-@property(weak, nonatomic) IBOutlet UILabel * product;
-@property(weak, nonatomic) IBOutlet UILabel * waitingTime;
-@property(weak, nonatomic) IBOutlet UILabel * price;
-
-@end
-
-@implementation MWMTaxiPreviewCell
-
-- (void)awakeFromNib
-{
- [super awakeFromNib];
- [self.icon layoutIfNeeded];
-}
-
-- (void)configWithProduct:(taxi::Product const &)product;
-{
- self.product.text = @(product.m_name.c_str());
- NSTimeInterval time;
- if (!strings::to_double(product.m_time, time))
- NSAssert(false, @"Incorrect time");
-
- NSString * formatted = [NSDateComponentsFormatter etaStringFrom:time];
- NSString * pattern = [L(@"taxi_wait") stringByReplacingOccurrencesOfString:@"%s" withString:@"%@"];
- self.waitingTime.text = [NSString stringWithFormat:pattern, formatted];
- self.price.text = @(product.m_price.c_str());
-}
-
-@end
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.xib
deleted file mode 100644
index 3e98c58d48..0000000000
--- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewCell.xib
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.h
index 0157d64b68..54ef558375 100644
--- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.h
+++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.h
@@ -16,7 +16,7 @@
completion:(MWMVoidBlock)completion
failure:(MWMStringBlock)failure;
-- (NSURL *)taxiURL;
+- (void)taxiURL:(MWMURLBlock)block;
- (BOOL)isTaxiInstalled;
@end
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.mm
index accacbbec1..31936f999c 100644
--- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.mm
+++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.mm
@@ -1,7 +1,6 @@
#import "MWMTaxiPreviewDataSource.h"
#import "MWMCommon.h"
#import "MWMNetworkPolicy.h"
-#import "MWMTaxiPreviewCell.h"
#import "SwiftBridge.h"
#include "Framework.h"
@@ -10,12 +9,6 @@
#include "partners_api/taxi_provider.hpp"
-namespace
-{
-CGFloat const kPageControlHeight = 6;
-
-} // namespace
-
@interface MWMTaxiCollectionView ()
@property(nonatomic) UIPageControl * pageControl;
@@ -38,10 +31,9 @@ CGFloat const kPageControlHeight = 6;
- (void)layoutSubviews
{
[super layoutSubviews];
- self.pageControl.height = kPageControlHeight;
- self.pageControl.width = self.width;
- self.pageControl.maxY = self.height - kPageControlHeight;
- self.pageControl.midX = self.center.x;
+ self.pageControl.height = 8;
+ self.pageControl.minY = 4;
+ self.pageControl.midX = self.superview.superview.center.x;
}
- (UIPageControl *)pageControl
@@ -49,6 +41,7 @@ CGFloat const kPageControlHeight = 6;
if (!_pageControl)
{
_pageControl = [[UIPageControl alloc] init];
+ _pageControl.backgroundColor = [UIColor clearColor];
[self.superview addSubview:_pageControl];
}
return _pageControl;
@@ -68,6 +61,7 @@ using namespace taxi;
@property(weak, nonatomic) MWMTaxiCollectionView * collectionView;
@property(nonatomic) BOOL isNeedToConstructURLs;
+@property(nonatomic) RoutePreviewTaxiCellType type;
@end
@@ -83,19 +77,11 @@ using namespace taxi;
collectionView.delegate = self;
collectionView.showsVerticalScrollIndicator = NO;
collectionView.showsHorizontalScrollIndicator = NO;
- [collectionView registerWithCellClass:[MWMTaxiPreviewCell class]];
+ [collectionView registerWithCellClass:[RoutePreviewTaxiCell class]];
}
return self;
}
-- (void)dealloc
-{
- MWMTaxiCollectionView * cv = self.collectionView;
- cv.dataSource = nil;
- cv.delegate = nil;
- self.collectionView = nil;
-}
-
- (void)requestTaxiFrom:(MWMRoutePoint *)from
to:(MWMRoutePoint *)to
completion:(MWMVoidBlock)completion
@@ -109,90 +95,116 @@ using namespace taxi;
cv.hidden = YES;
cv.pageControl.hidden = YES;
- // TODO Dummy, must be changed by IOS developer.
- // network_policy::CallPartnersApi(
- // [self, completion, failure](platform::NetworkPolicy const & canUseNetwork) {
- // auto const engine = GetFramework().GetTaxiEngine(canUseNetwork);
- // if (!engine) {
- // failure(L(@"dialog_taxi_error"));
- // return;
- // }
- //
- // auto success = [self, completion](taxi::ProvidersContainer const & providers,
- // uint64_t const requestId) {
- // if (self->m_requestId != requestId)
- // return;
- // auto const & products = providers.GetProducts();
- // runAsyncOnMainQueue([self, completion, products] {
- //
- // self->m_products = products;
- // auto cv = self.collectionView;
- // cv.hidden = NO;
- // cv.pageControl.hidden = NO;
- // cv.numberOfPages = self->m_products.size();
- // [cv reloadData];
- // cv.contentOffset = {};
- // cv.currentPage = 0;
- // completion();
- // });
- //
- // };
- // auto error = [self, failure](taxi::ErrorsContainer const & errors, uint64_t const
- // requestId) {
- // if (self->m_requestId != requestId)
- // return;
- //
- // runAsyncOnMainQueue(^{
- // switch (code)
- // {
- // case taxi::ErrorCode::NoProducts:
- // failure(L(@"taxi_not_found"));
- // break;
- // case taxi::ErrorCode::RemoteError:
- // failure(L(@"dialog_taxi_error"));
- // break;
- // }
- // });
- // };
- //
- // auto const topmostCountryIds = GetFramework().GetTopmostCountries(m_from);
- // m_requestId = engine->GetAvailableProducts(m_from, m_to, topmostCountryIds, success,
- // error);
- // },
- // true /* force */);
+ network_policy::CallPartnersApi(
+ [self, completion, failure](platform::NetworkPolicy const & canUseNetwork) {
+ auto const engine = GetFramework().GetTaxiEngine(canUseNetwork);
+ if (!engine) {
+ failure(L(@"dialog_taxi_error"));
+ return;
+ }
+
+ auto success = [self, completion](taxi::ProvidersContainer const & providers,
+ uint64_t const requestId) {
+ if (self->m_requestId != requestId)
+ return;
+ if (providers.empty())
+ {
+ NSCAssert(false, @"Providers container is empty");
+ return;
+ }
+ auto const & provider = providers.front();
+ auto const & products = provider.GetProducts();
+ auto const type = provider.GetType();
+ runAsyncOnMainQueue([self, completion, products, type] {
+ self->m_products = products;
+ switch (type)
+ {
+ case taxi::Provider::Type::Uber:
+ self.type = RoutePreviewTaxiCellTypeUber;
+ break;
+ case taxi::Provider::Type::Yandex:
+ self.type = RoutePreviewTaxiCellTypeYandex;
+ break;
+ }
+ auto cv = self.collectionView;
+ cv.hidden = NO;
+ cv.pageControl.hidden = products.size() == 1;
+ cv.numberOfPages = products.size();
+ cv.contentOffset = {};
+ cv.currentPage = 0;
+ [cv reloadData];
+ completion();
+ });
+
+ };
+ auto error = [self, failure](taxi::ErrorsContainer const & errors, uint64_t const
+ requestId) {
+ if (self->m_requestId != requestId)
+ return;
+ if (errors.empty())
+ {
+ NSCAssert(false, @"Errors container is empty");
+ return;
+ }
+ auto const & errorCode = errors.front().m_code;
+ runAsyncOnMainQueue(^{
+ switch (errorCode)
+ {
+ case taxi::ErrorCode::NoProducts:
+ failure(L(@"taxi_not_found"));
+ break;
+ case taxi::ErrorCode::RemoteError:
+ failure(L(@"dialog_taxi_error"));
+ break;
+ case taxi::ErrorCode::NoProvider:
+ failure(L(@"taxi_no_provider"));
+ break;
+ }
+ });
+ };
+
+ m_requestId = engine->GetAvailableProducts(m_from, m_to, success, error);
+ });
}
- (BOOL)isTaxiInstalled
{
- // TODO(Vlad): Not the best solution, need to store url's scheme of product in the uber::Product
- // instead of just "uber://".
- NSURL * url = [NSURL URLWithString:@"uber://"];
+ NSURL * url;
+ switch (self.type)
+ {
+ case RoutePreviewTaxiCellTypeTaxi: return NO;
+ case RoutePreviewTaxiCellTypeUber: url = [NSURL URLWithString:@"uber://"]; break;
+ case RoutePreviewTaxiCellTypeYandex: url = [NSURL URLWithString:@"yandextaxi://"]; break;
+ }
return [[UIApplication sharedApplication] canOpenURL:url];
}
-- (NSURL *)taxiURL;
+- (void)taxiURL:(MWMURLBlock)block
{
if (m_products.empty())
- return nil;
+ return;
auto const index = [self.collectionView indexPathsForVisibleItems].firstObject.row;
auto const productId = m_products[index].m_productId;
- RideRequestLinks links;
- // TODO Dummy, must be changed by IOS developer.
- // network_policy::CallPartnersApi(
- // [self](platform::NetworkPolicy const & canUseNetwork) {
- // auto const engine = GetFramework().GetTaxiEngine(canUseNetwork);
- // if (!engine) {
- // // TODO Dummy, should be implemented
- // return;
- // }
- //
- // links = engine->GetRideRequestLinks(productId, m_from, m_to);
- // },
- // true /* force */);
+ network_policy::CallPartnersApi(
+ [self, productId, block](platform::NetworkPolicy const & canUseNetwork)
+ {
+ auto const engine = GetFramework().GetTaxiEngine(canUseNetwork);
+ if (!engine)
+ return;
+ Provider::Type type;
+ switch (self.type)
+ {
+ case RoutePreviewTaxiCellTypeTaxi: return;
+ case RoutePreviewTaxiCellTypeUber: type = Provider::Type::Uber; break;
+ case RoutePreviewTaxiCellTypeYandex: type = Provider::Type::Yandex; break;
+ }
- return [NSURL URLWithString:self.isTaxiInstalled ? @(links.m_deepLink.c_str()) :
- @(links.m_universalLink.c_str())];
+ auto links = engine->GetRideRequestLinks(type, productId, m_from, m_to);
+ auto url = [NSURL URLWithString:self.isTaxiInstalled ? @(links.m_deepLink.c_str()) :
+ @(links.m_universalLink.c_str())];
+ block(url);
+ });
}
#pragma mark - UICollectionViewDataSource
@@ -204,10 +216,15 @@ using namespace taxi;
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
- Class cls = [MWMTaxiPreviewCell class];
- auto cell = static_cast(
+ Class cls = [RoutePreviewTaxiCell class];
+ auto cell = static_cast(
[collectionView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
- [cell configWithProduct:m_products[indexPath.row]];
+ auto const & product = m_products[indexPath.row];
+ [cell configWithType:self.type
+ title:@(product.m_name.c_str())
+ eta:@(product.m_time.c_str())
+ price:@(product.m_price.c_str())
+ currency:@(product.m_currency.c_str())];
return cell;
}
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.swift b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.swift
new file mode 100644
index 0000000000..f4ca08b34c
--- /dev/null
+++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.swift
@@ -0,0 +1,69 @@
+@objc
+enum RoutePreviewTaxiCellType: Int {
+ case taxi
+ case uber
+ case yandex
+}
+
+@objc
+final class RoutePreviewTaxiCell: UICollectionViewCell {
+
+ @IBOutlet private weak var icon: UIImageView!
+ @IBOutlet private weak var title: UILabel! {
+ didSet {
+ title.font = UIFont.bold14()
+ title.textColor = UIColor.blackPrimaryText()
+ }
+ }
+ @IBOutlet private weak var info: UILabel! {
+ didSet {
+ info.font = UIFont.regular14()
+ info.textColor = UIColor.blackSecondaryText()
+ }
+ }
+
+ func config(type: RoutePreviewTaxiCellType, title: String, eta: String, price: String, currency: String) {
+ let iconImage = { () -> UIImage in
+ switch type {
+ case .taxi: return #imageLiteral(resourceName: "icTaxiTaxi")
+ case .uber: return #imageLiteral(resourceName: "icTaxiUber")
+ case .yandex: return #imageLiteral(resourceName: "icTaxiYandex")
+ }
+ }
+
+ let titleString = { () -> String in
+ switch type {
+ case .taxi: fallthrough
+ case .uber: return title
+ case .yandex: return L("yandex_taxi_title")
+ }
+ }
+
+ let priceString = { () -> String in
+ switch type {
+ case .taxi: fallthrough
+ case .uber: return price
+ case .yandex:
+ let formatter = NumberFormatter()
+ formatter.numberStyle = .currency
+ formatter.currencyCode = currency
+ formatter.maximumFractionDigits = 0
+ if let number = UInt(price), let formattedPrice = formatter.string(from: NSNumber(value: number)) {
+ return formattedPrice
+ } else {
+ return "\(currency) \(price)"
+ }
+ }
+ }
+
+ let timeString = { () -> String in
+ let timeValue = DateComponentsFormatter.etaString(from: TimeInterval(eta)!)!
+ let format = L("taxi_wait").replacingOccurrences(of: "%s", with: "%@")
+ return String(format: format, arguments: [timeValue])
+ }
+
+ icon.image = iconImage()
+ self.title.text = titleString()
+ info.text = "~ \(priceString()) • \(timeString())"
+ }
+}
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.xib
new file mode 100644
index 0000000000..abb97f72cf
--- /dev/null
+++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.xib
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/iphone/Maps/Common/MWMTypes.h b/iphone/Maps/Common/MWMTypes.h
index 37e6162ec9..c0394d7e7d 100644
--- a/iphone/Maps/Common/MWMTypes.h
+++ b/iphone/Maps/Common/MWMTypes.h
@@ -1,5 +1,6 @@
typedef void (^MWMVoidBlock)();
typedef void (^MWMStringBlock)(NSString *);
+typedef void (^MWMURLBlock)(NSURL *);
typedef NS_ENUM(NSUInteger, MWMDayTime) { MWMDayTimeDay, MWMDayTimeNight };
diff --git a/iphone/Maps/Common/Statistics/StatisticsStrings.h b/iphone/Maps/Common/Statistics/StatisticsStrings.h
index cfafb6ca2c..9b4b19b518 100644
--- a/iphone/Maps/Common/Statistics/StatisticsStrings.h
+++ b/iphone/Maps/Common/Statistics/StatisticsStrings.h
@@ -252,6 +252,7 @@ static NSString * const kStatVehicle = @"Vehicle";
static NSString * const kStatVisible = @"Visible";
static NSString * const kStatWhatsNew = @"What's New";
static NSString * const kStatWifi = @"wifi";
+static NSString * const kStatYandex = @"Yandex";
static NSString * const kStatYes = @"Yes";
static NSString * const kStatZoom = @"Zoom";
static NSString * const kStatiPad = @"iPad";
diff --git a/iphone/Maps/Core/Routing/MWMRouter.mm b/iphone/Maps/Core/Routing/MWMRouter.mm
index 0717dd06a1..b4a234afa6 100644
--- a/iphone/Maps/Core/Routing/MWMRouter.mm
+++ b/iphone/Maps/Core/Routing/MWMRouter.mm
@@ -98,7 +98,9 @@ char const * kRenderAltitudeImagesQueueLabel = "mapsme.mwmrouter.renderAltitudeI
[[Crashlytics sharedInstance] recordError:err];
}
- [[UIApplication sharedApplication] openURL:taxiDataSource.taxiURL];
+ [taxiDataSource taxiURL:^(NSURL * url) {
+ [[UIApplication sharedApplication] openURL:url];
+ }];
}
+ (void)stopRouting
diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj
index 755ff2f506..f6910424c0 100644
--- a/iphone/Maps/Maps.xcodeproj/project.pbxproj
+++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj
@@ -167,6 +167,9 @@
3451F4ED1F026DAF00A981F2 /* PlacePageTaxiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3451F4EC1F026DAF00A981F2 /* PlacePageTaxiCell.swift */; };
3451F4EE1F026DAF00A981F2 /* PlacePageTaxiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3451F4EC1F026DAF00A981F2 /* PlacePageTaxiCell.swift */; };
3451F4EF1F026DAF00A981F2 /* PlacePageTaxiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3451F4EC1F026DAF00A981F2 /* PlacePageTaxiCell.swift */; };
+ 3451F4F11F02935300A981F2 /* RoutePreviewTaxiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3451F4F01F02935300A981F2 /* RoutePreviewTaxiCell.swift */; };
+ 3451F4F21F02935300A981F2 /* RoutePreviewTaxiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3451F4F01F02935300A981F2 /* RoutePreviewTaxiCell.swift */; };
+ 3451F4F31F02935300A981F2 /* RoutePreviewTaxiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3451F4F01F02935300A981F2 /* RoutePreviewTaxiCell.swift */; };
3454D7B81E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */; };
3454D7B91E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */; };
3454D7BA1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */; };
@@ -219,6 +222,9 @@
34574A661E3B85F80061E839 /* ThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34574A651E3B85F80061E839 /* ThemeManager.swift */; };
34574A671E3B85F80061E839 /* ThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34574A651E3B85F80061E839 /* ThemeManager.swift */; };
34574A681E3B85F80061E839 /* ThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34574A651E3B85F80061E839 /* ThemeManager.swift */; };
+ 345D661D1F0665880069E925 /* MAPSME.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8D1107310486CEB800E47090 /* MAPSME.plist */; };
+ 345D661E1F0665890069E925 /* MAPSME.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8D1107310486CEB800E47090 /* MAPSME.plist */; };
+ 345D661F1F0665890069E925 /* MAPSME.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8D1107310486CEB800E47090 /* MAPSME.plist */; };
3462258E1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3462258D1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm */; };
3462258F1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3462258D1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm */; };
346225911DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = 346225901DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib */; };
@@ -728,7 +734,7 @@
849CF5F61DE842290024A8A5 /* resources-6plus_clear in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D1571B8B4DD700D4EB6F /* resources-6plus_clear */; };
849CF5F81DE842290024A8A5 /* unicode_blocks.txt in Resources */ = {isa = PBXBuildFile; fileRef = EE583CBA12F773F00042CBE3 /* unicode_blocks.txt */; };
849CF5F91DE842290024A8A5 /* fonts_blacklist.txt in Resources */ = {isa = PBXBuildFile; fileRef = EEFE7C1212F8C9E1006AF8C3 /* fonts_blacklist.txt */; };
- 849CF5FA1DE842290024A8A5 /* MWMTaxiPreviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */; };
+ 849CF5FA1DE842290024A8A5 /* RoutePreviewTaxiCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib */; };
849CF5FC1DE842290024A8A5 /* resources-xxhdpi_clear in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D15A1B8B4DD700D4EB6F /* resources-xxhdpi_clear */; };
849CF5FE1DE842290024A8A5 /* MWMDefaultAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F198C1AB81A00006EAF7E /* MWMDefaultAlert.xib */; };
849CF5FF1DE842290024A8A5 /* fonts_whitelist.txt in Resources */ = {isa = PBXBuildFile; fileRef = EEFE7C1312F8C9E1006AF8C3 /* fonts_whitelist.txt */; };
@@ -853,7 +859,6 @@
849CF7631DE842290024A8A5 /* MWMAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64F19861AB81A00006EAF7E /* MWMAlert.mm */; };
849CF7651DE842290024A8A5 /* ColorPickerView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED48BBB417C267F5003E7E92 /* ColorPickerView.mm */; };
849CF7671DE842290024A8A5 /* CircleView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED48BBB917C2B1E2003E7E92 /* CircleView.mm */; };
- 849CF7691DE842290024A8A5 /* MWMTaxiPreviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */; };
849CF76D1DE842290024A8A5 /* AddSetTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D15BA61BD8F93C00C8BCBE /* AddSetTableViewCell.mm */; };
849CF76E1DE842290024A8A5 /* MWMEditorViralActivityItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6A218481CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm */; };
849CF7861DE842290024A8A5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A3A1B13222600E6D4FD /* libz.dylib */; settings = {ATTRIBUTES = (Required, ); }; };
@@ -965,10 +970,8 @@
F68BDF071EEA9A830009BB81 /* MyTargetSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F68BDF041EEA9A830009BB81 /* MyTargetSDK.framework */; };
F68FCB851DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB841DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm */; };
F68FCB861DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB841DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm */; };
- F68FCB8A1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */; };
- F68FCB8B1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */; };
- F68FCB8C1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */; };
- F68FCB8D1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */; };
+ F68FCB8C1DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib */; };
+ F68FCB8D1DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F68FCB891DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib */; };
F69018B81E9E601400B3C10B /* MWMAutoupdateController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F69018B71E9E601400B3C10B /* MWMAutoupdateController.mm */; };
F69018BC1E9F7CB600B3C10B /* MWMAutoupdateController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F69018BB1E9F7CB600B3C10B /* MWMAutoupdateController.xib */; };
F69018BD1E9F7CB600B3C10B /* MWMAutoupdateController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F69018BB1E9F7CB600B3C10B /* MWMAutoupdateController.xib */; };
@@ -1677,6 +1680,7 @@
344D63161E795A2D006F17CB /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
345050211E028B8000A8DC59 /* Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; };
3451F4EC1F026DAF00A981F2 /* PlacePageTaxiCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlacePageTaxiCell.swift; sourceTree = ""; };
+ 3451F4F01F02935300A981F2 /* RoutePreviewTaxiCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoutePreviewTaxiCell.swift; sourceTree = ""; };
3454D7991E07F045004AF2AD /* CALayer+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CALayer+RuntimeAttributes.h"; sourceTree = ""; };
3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CALayer+RuntimeAttributes.mm"; sourceTree = ""; };
3454D79B1E07F045004AF2AD /* CLLocation+Mercator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CLLocation+Mercator.h"; sourceTree = ""; };
@@ -1808,6 +1812,7 @@
34ABA62B1C2D57D500FE1BEC /* MWMInputPasswordValidator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMInputPasswordValidator.mm; sourceTree = ""; };
34ABA62E1C2D58F300FE1BEC /* MWMInputEmailValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMInputEmailValidator.h; sourceTree = ""; };
34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMInputEmailValidator.mm; sourceTree = ""; };
+ 34AC7F901F06538B0050DE2B /* MWMPlacePageTaxiProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageTaxiProvider.h; sourceTree = ""; };
34AC8FB91EFBAD1900E7F910 /* ViatorElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViatorElement.swift; sourceTree = ""; };
34AC8FC71EFC01F500E7F910 /* MWMRoutePoint.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMRoutePoint.mm; sourceTree = ""; };
34AC8FC81EFC01F500E7F910 /* MWMRoutePoint+CPP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MWMRoutePoint+CPP.h"; sourceTree = ""; };
@@ -2102,9 +2107,7 @@
F68BDF041EEA9A830009BB81 /* MyTargetSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MyTargetSDK.framework; sourceTree = ""; };
F68FCB831DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWMTaxiPreviewDataSource.h; path = Views/RoutePreview/MWMTaxiPreviewDataSource.h; sourceTree = ""; };
F68FCB841DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MWMTaxiPreviewDataSource.mm; path = Views/RoutePreview/MWMTaxiPreviewDataSource.mm; sourceTree = ""; };
- F68FCB871DA7BD20007CC7D7 /* MWMTaxiPreviewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTaxiPreviewCell.h; sourceTree = ""; };
- F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTaxiPreviewCell.mm; sourceTree = ""; };
- F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMTaxiPreviewCell.xib; sourceTree = ""; };
+ F68FCB891DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoutePreviewTaxiCell.xib; sourceTree = ""; };
F69018B61E9E601400B3C10B /* MWMAutoupdateController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAutoupdateController.h; sourceTree = ""; };
F69018B71E9E601400B3C10B /* MWMAutoupdateController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAutoupdateController.mm; sourceTree = ""; };
F69018BB1E9F7CB600B3C10B /* MWMAutoupdateController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMAutoupdateController.xib; sourceTree = ""; };
@@ -3313,9 +3316,8 @@
F6BD337E1B62403B00F2CE18 /* MWMRoutePreview.mm */,
F6F778781DABC6D800B603E7 /* MWMTaxiCollectionLayout.h */,
F6F778791DABC6D800B603E7 /* MWMTaxiCollectionLayout.mm */,
- F68FCB871DA7BD20007CC7D7 /* MWMTaxiPreviewCell.h */,
- F68FCB881DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm */,
- F68FCB891DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib */,
+ F68FCB891DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib */,
+ 3451F4F01F02935300A981F2 /* RoutePreviewTaxiCell.swift */,
);
path = RoutePreview;
sourceTree = "";
@@ -4005,6 +4007,7 @@
children = (
F6E2FCC91E097B9F0083EBEC /* PlacePageTaxiCell.xib */,
3451F4EC1F026DAF00A981F2 /* PlacePageTaxiCell.swift */,
+ 34AC7F901F06538B0050DE2B /* MWMPlacePageTaxiProvider.h */,
);
path = TaxiCell;
sourceTree = "";
@@ -4576,6 +4579,7 @@
349A13841DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */,
34D3B04A1E389D05004100F9 /* MWMNoteCell.xib in Resources */,
F6E2FDEE1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
+ 345D661D1F0665880069E925 /* MAPSME.plist in Resources */,
F6E2FDF41E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */,
F6E2FDFA1E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.xib in Resources */,
F6E2FE751E097BA00083EBEC /* MWMOpeningHoursCell.xib in Resources */,
@@ -4617,7 +4621,7 @@
3490D2E21CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */,
346DB82A1E5C4F6700E3123E /* GalleryCell.xib in Resources */,
F6E2FE2D1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.xib in Resources */,
- F68FCB8C1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */,
+ F68FCB8C1DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib in Resources */,
349B92701DF0526D007779DD /* MWMToast.xib in Resources */,
3463BA681DE81DB90082417F /* MWMTrafficButtonViewController.xib in Resources */,
F623DA6B1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */,
@@ -4747,6 +4751,7 @@
F6E2FDEF1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
F6E2FDF51E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */,
F6E2FDFB1E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.xib in Resources */,
+ 345D661E1F0665890069E925 /* MAPSME.plist in Resources */,
342639361EA0E60A0025EB89 /* local_ads_symbols.txt in Resources */,
4554B6EC1E55F0EF0084017F /* drules_proto_vehicle_clear.bin in Resources */,
F6E2FE761E097BA00083EBEC /* MWMOpeningHoursCell.xib in Resources */,
@@ -4786,7 +4791,7 @@
3490D2E31CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */,
346DB82B1E5C4F6700E3123E /* GalleryCell.xib in Resources */,
F6E2FE2E1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.xib in Resources */,
- F68FCB8D1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */,
+ F68FCB8D1DA7BD20007CC7D7 /* RoutePreviewTaxiCell.xib in Resources */,
349B92711DF0526D007779DD /* MWMToast.xib in Resources */,
3463BA691DE81DB90082417F /* MWMTrafficButtonViewController.xib in Resources */,
F623DA6C1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */,
@@ -4918,6 +4923,7 @@
F6E2FDF01E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
F6E2FDF61E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */,
F6E2FDFC1E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.xib in Resources */,
+ 345D661F1F0665890069E925 /* MAPSME.plist in Resources */,
342639381EA0E60B0025EB89 /* local_ads_symbols.txt in Resources */,
F6E2FE771E097BA00083EBEC /* MWMOpeningHoursCell.xib in Resources */,
4554B6ED1E55F0F00084017F /* drules_proto_vehicle_clear.bin in Resources */,
@@ -4959,7 +4965,7 @@
849CF6471DE842290024A8A5 /* MWMSideButtonsView.xib in Resources */,
346DB82C1E5C4F6700E3123E /* GalleryCell.xib in Resources */,
F6E2FE2F1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.xib in Resources */,
- 849CF5FA1DE842290024A8A5 /* MWMTaxiPreviewCell.xib in Resources */,
+ 849CF5FA1DE842290024A8A5 /* RoutePreviewTaxiCell.xib in Resources */,
349B92721DF0526D007779DD /* MWMToast.xib in Resources */,
8408BCE21E080DEF00789784 /* MWMTrafficButtonViewController.xib in Resources */,
849CF6611DE842290024A8A5 /* opening_hours_how_to_edit.html in Resources */,
@@ -5375,6 +5381,7 @@
346B42AB1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */,
F6E2FF021E097BA00083EBEC /* MWMSearchHistoryClearCell.mm in Sources */,
F63774EA1B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm in Sources */,
+ 3451F4F11F02935300A981F2 /* RoutePreviewTaxiCell.swift in Sources */,
340475081E08199E00C92850 /* MWMMyTarget.mm in Sources */,
3404164F1E7C085F00E2B6D6 /* PhotoViewController.swift in Sources */,
F64F19A31AB81A00006EAF7E /* MWMDownloadTransitMapAlert.mm in Sources */,
@@ -5400,7 +5407,6 @@
ED48BBBA17C2B1E2003E7E92 /* CircleView.mm in Sources */,
F6E2FEEA1E097BA00083EBEC /* MWMSearchTextField.mm in Sources */,
F6664C121E645A4100E703C2 /* MWMPPReviewCell.mm in Sources */,
- F68FCB8A1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */,
3451F4ED1F026DAF00A981F2 /* PlacePageTaxiCell.swift in Sources */,
34EE25A91EFA726400F870AB /* ViatorItemModel.swift in Sources */,
3454D7D91E07F045004AF2AD /* UILabel+RuntimeAttributes.mm in Sources */,
@@ -5673,6 +5679,7 @@
346B42AC1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */,
6741AA221BF340DE002C974C /* MWMNavigationView.mm in Sources */,
F6E2FF031E097BA00083EBEC /* MWMSearchHistoryClearCell.mm in Sources */,
+ 3451F4F21F02935300A981F2 /* RoutePreviewTaxiCell.swift in Sources */,
340475091E08199E00C92850 /* MWMMyTarget.mm in Sources */,
340416501E7C086000E2B6D6 /* PhotoViewController.swift in Sources */,
674A7E301C0DB10B003D48E1 /* MWMMapWidgets.mm in Sources */,
@@ -5698,7 +5705,6 @@
6741AA291BF340DE002C974C /* ColorPickerView.mm in Sources */,
6741AA2B1BF340DE002C974C /* CircleView.mm in Sources */,
F6E2FEEB1E097BA00083EBEC /* MWMSearchTextField.mm in Sources */,
- F68FCB8B1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */,
3451F4EE1F026DAF00A981F2 /* PlacePageTaxiCell.swift in Sources */,
34EE25AA1EFA726400F870AB /* ViatorItemModel.swift in Sources */,
F6E2FD9E1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */,
@@ -5971,6 +5977,7 @@
3404756F1E081A4600C92850 /* MWMSearch.mm in Sources */,
849CF74C1DE842290024A8A5 /* MWMLocationNotFoundAlert.mm in Sources */,
F6E2FF041E097BA00083EBEC /* MWMSearchHistoryClearCell.mm in Sources */,
+ 3451F4F31F02935300A981F2 /* RoutePreviewTaxiCell.swift in Sources */,
340475541E081A4600C92850 /* MWMCustomFacebookEvents.mm in Sources */,
340416511E7C086000E2B6D6 /* PhotoViewController.swift in Sources */,
3404750A1E08199E00C92850 /* MWMMyTarget.mm in Sources */,
@@ -6002,7 +6009,6 @@
849CF7671DE842290024A8A5 /* CircleView.mm in Sources */,
F6E2FD9F1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */,
F6E2FE0B1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */,
- 849CF7691DE842290024A8A5 /* MWMTaxiPreviewCell.mm in Sources */,
849CF76D1DE842290024A8A5 /* AddSetTableViewCell.mm in Sources */,
F6E2FED71E097BA00083EBEC /* MWMSearchChangeModeView.mm in Sources */,
849CF76E1DE842290024A8A5 /* MWMEditorViralActivityItem.mm in Sources */,
diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm b/iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm
index 151221211a..b1a1d7c2ca 100644
--- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm
+++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuView.mm
@@ -20,7 +20,7 @@ CGFloat constexpr kAdditionalHeight = 64;
CGFloat constexpr kDefaultMainButtonsHeight = 48;
CGFloat constexpr kBicyclePlanningMainButtonsHeightLandscape = 62;
CGFloat constexpr kBicyclePlanningMainButtonsHeightRegular = 94;
-CGFloat constexpr kTaxiPreviewMainButtonHeight = 84.;
+CGFloat constexpr kTaxiPreviewMainButtonHeight = 68.;
CGFloat constexpr kDefaultMenuButtonWidth = 60;
CGFloat constexpr kRoutingAdditionalButtonsOffsetCompact = 0;
CGFloat constexpr kRoutingAdditionalButtonsOffsetRegular = 48;
@@ -35,7 +35,7 @@ CGFloat constexpr kSpeedDistanceWidthCompact = 72;
CGFloat constexpr kSpeedDistanceWidthLandscape = 128;
CGFloat constexpr kSpeedDistanceWidthRegular = 88;
CGFloat constexpr kGoButtonWidthLandscape = 128;
-CGFloat constexpr kGoButtonWidthRegular = 96;
+CGFloat constexpr kGoButtonWidthRegular = 80;
CGFloat constexpr kPageControlTopOffsetRegular = 0;
CGFloat constexpr kPageControlTopOffsetLandscape = -8;
CGFloat constexpr kPageControlScaleLandscape = 0.7;
diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.xib b/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.xib
index bbfe0867c7..62dded9701 100644
--- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.xib
+++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.xib
@@ -1,11 +1,11 @@
-
+
-
+
@@ -95,10 +95,10 @@
-
+
-
+
@@ -141,10 +141,11 @@
-
+
-
+
@@ -336,15 +340,14 @@
-
+
-
-
+
@@ -353,10 +356,10 @@
-
+
-
+
diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageButtonsProtocol.h b/iphone/Maps/UI/PlacePage/MWMPlacePageButtonsProtocol.h
index cfb598ffdf..f8da544c47 100644
--- a/iphone/Maps/UI/PlacePage/MWMPlacePageButtonsProtocol.h
+++ b/iphone/Maps/UI/PlacePage/MWMPlacePageButtonsProtocol.h
@@ -1,3 +1,5 @@
+#import "MWMPlacePageTaxiProvider.h"
+
typedef UIView * _Nullable (^MWMPlacePageButtonsDismissBlock)(NSInteger);
@protocol MWMPlacePageButtonsProtocol
@@ -7,7 +9,7 @@ typedef UIView * _Nullable (^MWMPlacePageButtonsDismissBlock)(NSInteger);
- (void)addBusiness;
- (void)book:(BOOL)isDescription;
- (void)editBookmark;
-- (void)taxiTo;
+- (void)orderTaxi:(MWMPlacePageTaxiProvider)provider;
- (void)showAllReviews;
- (void)showAllFacilities;
- (void)showPhotoAtIndex:(NSInteger)index
diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageData.h b/iphone/Maps/UI/PlacePage/MWMPlacePageData.h
index fa3212af7b..015a62c7c6 100644
--- a/iphone/Maps/UI/PlacePage/MWMPlacePageData.h
+++ b/iphone/Maps/UI/PlacePage/MWMPlacePageData.h
@@ -160,6 +160,9 @@ using BannerIsReady = void (^)();
- (RouteMarkType)routeMarkType;
- (int8_t)intermediateIndex;
+// Taxi
+- (std::vector)taxiProviders;
+
// Banner
- (id)nativeAd;
diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm b/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm
index cac326fc37..3a4a577431 100644
--- a/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm
+++ b/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm
@@ -86,7 +86,7 @@ using namespace place_page;
m_sections.push_back(Sections::Metainfo);
[self fillMetaInfoSection];
- if (!m_info.ReachableByTaxiProviders().empty())
+ if (![self taxiProviders].empty())
{
m_sections.push_back(Sections::Ad);
m_adRows.push_back(AdRows::Taxi);
@@ -593,6 +593,12 @@ using namespace place_page;
f.GetLocalAdsManager().GetStatistics().RegisterEvent(std::move(event));
}
+#pragma mark - Taxi
+- (std::vector)taxiProviders
+{
+ return m_info.ReachableByTaxiProviders();
+}
+
#pragma mark - Getters
- (RouteMarkType)routeMarkType { return m_info.m_routeMarkType; }
diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm b/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm
index efad2a3796..ec7ce13776 100644
--- a/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm
+++ b/iphone/Maps/UI/PlacePage/MWMPlacePageManager.mm
@@ -297,13 +297,20 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
[self shouldClose];
}
-- (void)taxiTo
+- (void)orderTaxi:(MWMPlacePageTaxiProvider)provider
{
auto data = self.data;
if (!data)
return;
+ NSString * providerString = nil;
+ switch (provider)
+ {
+ case MWMPlacePageTaxiProviderTaxi: providerString = kStatUnknown;
+ case MWMPlacePageTaxiProviderUber: providerString = kStatUber;
+ case MWMPlacePageTaxiProviderYandex: providerString = kStatYandex;
+ }
[Statistics logEvent:kStatPlacePageTaxiClick
- withParameters:@{kStatProvider : kStatUber, kStatTags : data.statisticsTags}];
+ withParameters:@{kStatProvider : providerString, kStatTags : data.statisticsTags}];
[MWMRouter setType:MWMRouterTypeTaxi];
[MWMRouter buildToPoint:[self routePointWithType:MWMRoutePointTypeFinish] bestRouter:NO];
[self close];
diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/MWMPlacePageTaxiProvider.h b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/MWMPlacePageTaxiProvider.h
new file mode 100644
index 0000000000..dce4777b41
--- /dev/null
+++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/MWMPlacePageTaxiProvider.h
@@ -0,0 +1,5 @@
+typedef NS_ENUM(NSInteger, MWMPlacePageTaxiProvider) {
+ MWMPlacePageTaxiProviderTaxi = 0,
+ MWMPlacePageTaxiProviderUber = 1,
+ MWMPlacePageTaxiProviderYandex = 2
+};
diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/PlacePageTaxiCell.swift b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/PlacePageTaxiCell.swift
index 6434dcb670..99abb4f521 100644
--- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/PlacePageTaxiCell.swift
+++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/PlacePageTaxiCell.swift
@@ -1,10 +1,3 @@
-@objc
-enum PlacePageTaxiCellType: Int {
- case taxi
- case uber
- case yandex
-}
-
@objc
final class PlacePageTaxiCell: MWMTableViewCell {
@@ -29,9 +22,11 @@ final class PlacePageTaxiCell: MWMTableViewCell {
}
private weak var delegate: MWMPlacePageButtonsProtocol!
+ private var type: MWMPlacePageTaxiProvider!
- func config(type: PlacePageTaxiCellType, delegate: MWMPlacePageButtonsProtocol) {
+ func config(type: MWMPlacePageTaxiProvider, delegate: MWMPlacePageButtonsProtocol) {
self.delegate = delegate
+ self.type = type
switch type {
case .taxi:
icon.image = #imageLiteral(resourceName: "icTaxiTaxi")
@@ -41,11 +36,11 @@ final class PlacePageTaxiCell: MWMTableViewCell {
title.text = L("taxi_uber")
case .yandex:
icon.image = #imageLiteral(resourceName: "icTaxiYandex")
- title.text = L("taxi_yandex")
+ title.text = L("yandex_taxi_title")
}
}
@IBAction func orderAction() {
- delegate.taxiTo()
+ delegate.orderTaxi(type)
}
}
diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/PlacePageTaxiCell.xib b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/PlacePageTaxiCell.xib
index 0d999ec175..8ed20d00bf 100644
--- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/PlacePageTaxiCell.xib
+++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/TaxiCell/PlacePageTaxiCell.xib
@@ -43,7 +43,6 @@
-
diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm
index 40e19c895e..5e6c277d99 100644
--- a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm
+++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm
@@ -392,7 +392,16 @@ map const kMetaInfoCells = {
{
Class cls = [PlacePageTaxiCell class];
auto c = static_cast([tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]);
- [c configWithType:PlacePageTaxiCellTypeTaxi delegate:delegate];
+ auto taxiProviders = [data taxiProviders];
+ NSAssert(!taxiProviders.empty(), @"TaxiProviders can not be empty");
+ auto const & provider = taxiProviders.front();
+ auto type = MWMPlacePageTaxiProviderTaxi;
+ switch (provider)
+ {
+ case taxi::Provider::Uber: type = MWMPlacePageTaxiProviderUber; break;
+ case taxi::Provider::Yandex: type = MWMPlacePageTaxiProviderYandex; break;
+ }
+ [c configWithType:type delegate:delegate];
return c;
}
case Sections::Buttons: