forked from organicmaps/organicmaps
[MAPSME-4676] [ios] Updated UI for new routing interface.
This commit is contained in:
parent
6dd8e1f87b
commit
34239e7171
46 changed files with 992 additions and 839 deletions
|
@ -303,7 +303,6 @@
|
|||
if (!url)
|
||||
{
|
||||
NSAssert(false, @"URL is nil!");
|
||||
auto urlString = url.absoluteString;
|
||||
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
|
||||
code:0
|
||||
userInfo:@{
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
- (void)onRouteReady;
|
||||
- (void)onRouteStart;
|
||||
- (void)onRouteStop;
|
||||
- (void)onRoutePointsUpdated;
|
||||
|
||||
- (void)processMyPositionStateModeEvent:(location::EMyPositionMode)mode;
|
||||
|
||||
|
|
|
@ -178,10 +178,9 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
[self.navigationManager setMapSearch];
|
||||
}
|
||||
MWMRoutingPlaneMode const m = MapsAppDelegate.theApp.routingPlaneMode;
|
||||
if (state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
if (!IPAD || m == MWMRoutingPlaneModeNone)
|
||||
if (!IPAD)
|
||||
{
|
||||
self.hidden = NO;
|
||||
self.leftBound = self.topBound = 0.0;
|
||||
|
@ -190,45 +189,26 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[self.ownerController setNeedsStatusBarAppearanceUpdate];
|
||||
if (!IPAD || (state != MWMSearchManagerStateDefault && state != MWMSearchManagerStateHidden))
|
||||
return;
|
||||
if (m == MWMRoutingPlaneModeSearchSource || m == MWMRoutingPlaneModeSearchDestination)
|
||||
if (state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
if (state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
self.navigationManager.routePreview.alpha = 1.;
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.navigationManager.routePreview.alpha = 0.;
|
||||
}
|
||||
self.navigationManager.routePreview.alpha = 1.;
|
||||
}];
|
||||
}
|
||||
else if (m == MWMRoutingPlaneModePlacePage)
|
||||
else
|
||||
{
|
||||
if (state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
self.navigationManager.routePreview.alpha = 1.;
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
self.navigationManager.routePreview.alpha = 0.;
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModeNone;
|
||||
self.navigationManager.routePreview.alpha = 1.;
|
||||
[self.navigationManager.routePreview removeFromSuperview];
|
||||
[MWMRouter stopRouting];
|
||||
self.navigationManager.state = MWMNavigationDashboardStateHidden;
|
||||
self.menuController.p2pButton.selected = NO;
|
||||
}];
|
||||
}
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
self.navigationManager.routePreview.alpha = 0.;
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
self.navigationManager.routePreview.alpha = 1.;
|
||||
[self.navigationManager.routePreview removeFromSuperview];
|
||||
[MWMRouter stopRouting];
|
||||
self.navigationManager.state = MWMNavigationDashboardStateHidden;
|
||||
self.menuController.p2pButton.selected = NO;
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,7 +244,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
MapViewController * ownerController = self.ownerController;
|
||||
if (platform::migrate::NeedMigrate())
|
||||
{
|
||||
if (GetFramework().GetRoutingManager().IsRoutingActive())
|
||||
if ([MWMRouter isRoutingActive])
|
||||
{
|
||||
[Statistics logEvent:kStatDownloaderMigrationProhibitedDialogue
|
||||
withParameters:@{kStatFrom : kStatDownloader}];
|
||||
|
@ -341,7 +321,30 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
|
||||
- (void)routePreviewDidChangeFrame:(CGRect)newFrame
|
||||
{
|
||||
if (!IPAD)
|
||||
if (IPAD)
|
||||
{
|
||||
CGFloat const bound = newFrame.origin.x + newFrame.size.width;
|
||||
if (self.searchManager.state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
CGFloat const leftBound = newFrame.origin.x + newFrame.size.width;
|
||||
self.navigationManager.leftBound = leftBound;
|
||||
self.placePageManager.leftBound = leftBound;
|
||||
self.trafficButton.leftBound = leftBound;
|
||||
}
|
||||
else
|
||||
{
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
CGFloat const alpha = bound > 0 ? 0. : 1.;
|
||||
for (UIView * view in self.searchManager.topViews)
|
||||
view.alpha = alpha;
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
self.searchManager.state = MWMSearchManagerStateHidden;
|
||||
}];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CGFloat const bound = newFrame.origin.y + newFrame.size.height;
|
||||
self.placePageManager.topBound = bound;
|
||||
|
@ -349,54 +352,29 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
self.trafficButton.topBound = bound;
|
||||
return;
|
||||
}
|
||||
|
||||
CGFloat const bound = newFrame.origin.x + newFrame.size.width;
|
||||
if (self.searchManager.state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
CGFloat const leftBound = newFrame.origin.x + newFrame.size.width;
|
||||
self.placePageManager.leftBound = leftBound;
|
||||
self.menuController.leftBound = leftBound;
|
||||
self.trafficButton.leftBound = leftBound;
|
||||
}
|
||||
else
|
||||
{
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
CGFloat const alpha = bound > 0 ? 0. : 1.;
|
||||
for (UIView * view in self.searchManager.topViews)
|
||||
view.alpha = alpha;
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
self.searchManager.state = MWMSearchManagerStateHidden;
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)navigationDashBoardDidUpdate
|
||||
{
|
||||
auto nm = self.navigationManager;
|
||||
if (IPAD)
|
||||
{
|
||||
[self.placePageManager setTopBound:self.topBound + self.navigationManager.leftHeight];
|
||||
[self.placePageManager setTopBound:self.topBound + nm.leftTop];
|
||||
}
|
||||
else
|
||||
{
|
||||
CGFloat const topBound = self.topBound + self.navigationManager.rightHeight;
|
||||
auto const topBound = self.topBound + nm.rightTop;
|
||||
auto const bottomBound = nm.bottom;
|
||||
[self.sideButtons setTopBound:topBound];
|
||||
[self.sideButtons setBottomBound:bottomBound];
|
||||
[MWMMapWidgets widgetsManager].bottomBound = bottomBound;
|
||||
[MWMMapWidgets widgetsManager].leftBound = nm.left;
|
||||
BOOL const skipNavDashboardHeight =
|
||||
self.navigationManager.state == MWMNavigationDashboardStateNavigation;
|
||||
[self.placePageManager setTopBound:skipNavDashboardHeight ? self.topBound : topBound];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didStartEditingRoutePoint:(BOOL)isSource
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatSearch)
|
||||
withParameters:@{kStatValue : (isSource ? kStatSource : kStatDestination)}];
|
||||
MapsAppDelegate.theApp.routingPlaneMode =
|
||||
isSource ? MWMRoutingPlaneModeSearchSource : MWMRoutingPlaneModeSearchDestination;
|
||||
self.searchManager.state = MWMSearchManagerStateDefault;
|
||||
}
|
||||
|
||||
- (void)setDisableStandbyOnRouteFollowing:(BOOL)disableStandbyOnRouteFollowing
|
||||
{
|
||||
if (_disableStandbyOnRouteFollowing == disableStandbyOnRouteFollowing)
|
||||
|
@ -418,8 +396,8 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
- (void)onRoutePrepare
|
||||
{
|
||||
self.navigationManager.state = MWMNavigationDashboardStatePrepare;
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
self.menuController.p2pButton.selected = YES;
|
||||
[self onRoutePointsUpdated];
|
||||
}
|
||||
|
||||
- (void)onRouteRebuild
|
||||
|
@ -433,15 +411,15 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
- (void)onRouteError
|
||||
{
|
||||
self.navigationManager.state = MWMNavigationDashboardStateError;
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
}
|
||||
|
||||
- (void)onRouteReady
|
||||
{
|
||||
if (![MWMRouter router].startPoint.isMyPosition)
|
||||
auto startPoint = [MWMRouter startPoint];
|
||||
if (!startPoint || !startPoint.isMyPosition)
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
GetFramework().GetRoutingManager().DisableFollowMode();
|
||||
[MWMRouter disableFollowMode];
|
||||
[self.navigationManager updateDashboard];
|
||||
});
|
||||
}
|
||||
|
@ -469,6 +447,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[self navigationDashBoardDidUpdate];
|
||||
}
|
||||
|
||||
- (void)onRoutePointsUpdated { [self.navigationManager onRoutePointsUpdated]; }
|
||||
#pragma mark - Properties
|
||||
|
||||
- (MWMSideButtons *)sideButtons
|
||||
|
@ -588,8 +567,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
if (!IPAD)
|
||||
return;
|
||||
MWMRoutingPlaneMode const m = MapsAppDelegate.theApp.routingPlaneMode;
|
||||
if (m != MWMRoutingPlaneModeNone)
|
||||
if ([MWMRouter isRoutingActive])
|
||||
return;
|
||||
_leftBound = self.placePageManager.leftBound = self.navigationManager.leftBound =
|
||||
self.menuController.leftBound = self.trafficButton.leftBound = leftBound;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#import "MWMSideButtons.h"
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMButton.h"
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMMapViewControlsManager.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MWMSettings.h"
|
||||
#import "MWMSideButtonsView.h"
|
||||
#import "Statistics.h"
|
||||
|
@ -206,7 +207,7 @@ NSArray<UIImage *> * animationImages(NSString * animationTemplate, NSUInteger im
|
|||
- (BOOL)zoomHidden { return self.sideView.zoomHidden; }
|
||||
- (void)setZoomHidden:(BOOL)zoomHidden
|
||||
{
|
||||
if (GetFramework().GetRoutingManager().IsRoutingActive())
|
||||
if ([MWMRouter isRoutingActive])
|
||||
self.sideView.zoomHidden = NO;
|
||||
else
|
||||
self.sideView.zoomHidden = [MWMSettings zoomButtonsEnabled] ? zoomHidden : YES;
|
||||
|
|
|
@ -89,38 +89,44 @@ CGFloat const kButtonsBottomOffset = 6;
|
|||
}];
|
||||
}
|
||||
|
||||
- (void)doAnimate
|
||||
{
|
||||
[self layoutYPosition];
|
||||
|
||||
CGFloat const spaceLeft = self.bottomBound - self.topBound -
|
||||
(equalScreenDimensions(self.topBound, 0.0) ? statusBarHeight() : 0.0);
|
||||
BOOL const isZoomHidden = self.zoomIn.alpha == 0.0;
|
||||
BOOL const willZoomHide = (self.location.maxY > spaceLeft);
|
||||
if (willZoomHide)
|
||||
{
|
||||
if (!isZoomHidden)
|
||||
[self fadeZoomButtonsShow:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isZoomHidden)
|
||||
[self fadeZoomButtonsShow:YES];
|
||||
}
|
||||
BOOL const isLocationHidden = self.location.alpha == 0.0;
|
||||
BOOL const willLocationHide = (self.location.height > spaceLeft);
|
||||
if (willLocationHide)
|
||||
{
|
||||
if (!isLocationHidden)
|
||||
[self fadeLocationButtonShow:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isLocationHidden)
|
||||
[self fadeLocationButtonShow:YES];
|
||||
}
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)animate
|
||||
{
|
||||
runAsyncOnMainQueue(^{
|
||||
[self layoutYPosition];
|
||||
|
||||
CGFloat const spaceLeft = self.bottomBound - self.topBound -
|
||||
(equalScreenDimensions(self.topBound, 0.0) ? statusBarHeight() : 0.0);
|
||||
BOOL const isZoomHidden = self.zoomIn.alpha == 0.0;
|
||||
BOOL const willZoomHide = (self.location.maxY > spaceLeft);
|
||||
if (willZoomHide)
|
||||
{
|
||||
if (!isZoomHidden)
|
||||
[self fadeZoomButtonsShow:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isZoomHidden)
|
||||
[self fadeZoomButtonsShow:YES];
|
||||
}
|
||||
BOOL const isLocationHidden = self.location.alpha == 0.0;
|
||||
BOOL const willLocationHide = (self.location.height > spaceLeft);
|
||||
if (willLocationHide)
|
||||
{
|
||||
if (!isLocationHidden)
|
||||
[self fadeLocationButtonShow:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isLocationHidden)
|
||||
[self fadeLocationButtonShow:YES];
|
||||
}
|
||||
});
|
||||
auto doAnimate = @selector(doAnimate);
|
||||
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:doAnimate object:nil];
|
||||
[self performSelector:doAnimate withObject:nil afterDelay:0];
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
|
|
@ -23,7 +23,7 @@ using namespace routing::turns;
|
|||
_progress = info.m_completionPercent;
|
||||
auto & f = GetFramework();
|
||||
CLLocation * lastLocation = [MWMLocationManager lastLocation];
|
||||
if (lastLocation && f.GetRoutingManager().GetRouter() == routing::RouterType::Pedestrian)
|
||||
if (lastLocation && [MWMRouter type] == MWMRouterTypePedestrian)
|
||||
{
|
||||
_isPedestrian = YES;
|
||||
string distance;
|
||||
|
@ -78,7 +78,7 @@ using namespace routing::turns;
|
|||
|
||||
UIImage * image(routing::turns::TurnDirection t, bool isNextTurn)
|
||||
{
|
||||
if (GetFramework().GetRoutingManager().GetRouter() == routing::RouterType::Pedestrian)
|
||||
if ([MWMRouter type] == MWMRouterTypePedestrian)
|
||||
return [UIImage imageNamed:@"ic_direction"];
|
||||
|
||||
NSString * imageName;
|
||||
|
|
|
@ -21,7 +21,6 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState) {
|
|||
|
||||
@protocol MWMNavigationDashboardManagerProtocol<MWMNavigationViewProtocol>
|
||||
|
||||
- (void)didStartEditingRoutePoint:(BOOL)isSource;
|
||||
- (void)setMenuState:(MWMBottomMenuState)menuState;
|
||||
- (void)setMenuRestoreState:(MWMBottomMenuState)menuState;
|
||||
- (void)setRoutingErrorMessage:(NSString *)errorMessage;
|
||||
|
@ -40,8 +39,10 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState) {
|
|||
@property(weak, nonatomic, readonly) id<MWMNavigationDashboardManagerProtocol> delegate;
|
||||
@property(nonatomic) CGFloat topBound;
|
||||
@property(nonatomic) CGFloat leftBound;
|
||||
@property(nonatomic, readonly) CGFloat leftHeight;
|
||||
@property(nonatomic, readonly) CGFloat rightHeight;
|
||||
@property(nonatomic, readonly) CGFloat leftTop;
|
||||
@property(nonatomic, readonly) CGFloat rightTop;
|
||||
@property(nonatomic, readonly) CGFloat bottom;
|
||||
@property(nonatomic, readonly) CGFloat left;
|
||||
|
||||
- (instancetype)init __attribute__((unavailable("init is not available")));
|
||||
- (instancetype)initWithParentView:(UIView *)view
|
||||
|
@ -56,4 +57,6 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState) {
|
|||
|
||||
- (void)updateStartButtonTitle:(UIButton *)startButton;
|
||||
|
||||
- (void)onRoutePointsUpdated;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#import "MWMNavigationDashboardManager.h"
|
||||
#import <AudioToolbox/AudioServices.h>
|
||||
#import <Crashlytics/Crashlytics.h>
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMLocationHelpers.h"
|
||||
#import "MWMMapViewControlsManager.h"
|
||||
#import "MWMNavigationInfoView.h"
|
||||
#import "MWMRoutePoint+CPP.h"
|
||||
#import "MWMRoutePreview.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MWMTaxiPreviewDataSource.h"
|
||||
|
@ -65,7 +67,7 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
|
||||
- (void)updateFollowingInfo:(location::FollowingInfo const &)info
|
||||
{
|
||||
if (GetFramework().GetRoutingManager().IsRouteFinished())
|
||||
if ([MWMRouter isRouteFinished])
|
||||
{
|
||||
[MWMRouter stopRouting];
|
||||
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
|
||||
|
@ -82,7 +84,7 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
return;
|
||||
|
||||
[self.routePreview stateError];
|
||||
[self.routePreview router:[MWMRouter router].type setState:MWMCircularProgressStateFailed];
|
||||
[self.routePreview router:[MWMRouter type] setState:MWMCircularProgressStateFailed];
|
||||
}
|
||||
|
||||
- (void)updateDashboard
|
||||
|
@ -93,11 +95,29 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
[infoDisplay updateNavigationInfo:self.entity];
|
||||
}
|
||||
|
||||
#pragma mark - MWMNavigationInfoView
|
||||
|
||||
- (IBAction)addLocationRoutePoint
|
||||
{
|
||||
if (![MWMRouter startPoint])
|
||||
{
|
||||
[MWMRouter
|
||||
buildFromPoint:[[MWMRoutePoint alloc] initWithLastLocationAndType:MWMRoutePointTypeStart]
|
||||
bestRouter:NO];
|
||||
}
|
||||
else if (![MWMRouter finishPoint])
|
||||
{
|
||||
[MWMRouter
|
||||
buildToPoint:[[MWMRoutePoint alloc] initWithLastLocationAndType:MWMRoutePointTypeFinish]
|
||||
bestRouter:NO];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - MWMRoutePreview
|
||||
|
||||
- (void)setRouteBuilderProgress:(CGFloat)progress
|
||||
{
|
||||
[self.routePreview router:[MWMRouter router].type setProgress:progress / 100.];
|
||||
[self.routePreview router:[MWMRouter type] setProgress:progress / 100.];
|
||||
}
|
||||
|
||||
#pragma mark - MWMNavigationDashboard
|
||||
|
@ -131,24 +151,23 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
{
|
||||
[self.routePreview remove];
|
||||
self.routePreview = nil;
|
||||
[self.navigationInfoView remove];
|
||||
self.navigationInfoView.state = MWMNavigationInfoViewStateHidden;
|
||||
self.navigationInfoView = nil;
|
||||
}
|
||||
|
||||
- (void)showStatePrepare
|
||||
{
|
||||
[self.navigationInfoView remove];
|
||||
self.navigationInfoView = nil;
|
||||
self.navigationInfoView.state = MWMNavigationInfoViewStatePrepare;
|
||||
[self.routePreview addToView:self.ownerView];
|
||||
[self.routePreview statePrepare];
|
||||
[self.routePreview selectRouter:[MWMRouter router].type];
|
||||
[self.routePreview selectRouter:[MWMRouter type]];
|
||||
[self setMenuState:MWMBottomMenuStateHidden];
|
||||
}
|
||||
|
||||
- (void)showStatePlanning
|
||||
{
|
||||
[self showStatePrepare];
|
||||
[self setMenuState:MWMBottomMenuStatePlanning];
|
||||
[self.routePreview router:[MWMRouter router].type setState:MWMCircularProgressStateSpinner];
|
||||
[self.routePreview router:[MWMRouter type] setState:MWMCircularProgressStateSpinner];
|
||||
[self setRouteBuilderProgress:0.];
|
||||
if (![MWMRouter isTaxi])
|
||||
return;
|
||||
|
@ -160,10 +179,9 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
[self setMenuErrorStateWithErrorMessage:errorMessage];
|
||||
};
|
||||
|
||||
auto r = [MWMRouter router];
|
||||
auto const & start = r.startPoint;
|
||||
auto const & finish = r.finishPoint;
|
||||
if (start.isValid && finish.isValid)
|
||||
auto pFrom = [MWMRouter startPoint];
|
||||
auto pTo = [MWMRouter finishPoint];
|
||||
if (pFrom && pTo)
|
||||
{
|
||||
if (!Platform::IsConnected())
|
||||
{
|
||||
|
@ -171,16 +189,26 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
showError(L(@"dialog_taxi_offline"));
|
||||
return;
|
||||
}
|
||||
[self.taxiDataSource requestTaxiFrom:start to:finish completion:^
|
||||
{
|
||||
[self setMenuState:MWMBottomMenuStateGo];
|
||||
[self.routePreview stateReady];
|
||||
[self setRouteBuilderProgress:100.];
|
||||
}
|
||||
failure:^(NSString * errorMessage)
|
||||
{
|
||||
showError(errorMessage);
|
||||
}];
|
||||
[self.taxiDataSource requestTaxiFrom:pFrom
|
||||
to:pTo
|
||||
completion:^{
|
||||
[self setMenuState:MWMBottomMenuStateGo];
|
||||
[self.routePreview stateReady];
|
||||
[self setRouteBuilderProgress:100.];
|
||||
}
|
||||
failure:^(NSString * errorMessage) {
|
||||
showError(errorMessage);
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
|
||||
code:5
|
||||
userInfo:@{
|
||||
@"Description" : @"Invalid number of taxi route points",
|
||||
@"Count" : @([MWMRouter pointsCount])
|
||||
}];
|
||||
[[Crashlytics sharedInstance] recordError:err];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,7 +226,7 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
[self setMenuState:MWMBottomMenuStateRouting];
|
||||
[self.routePreview remove];
|
||||
self.routePreview = nil;
|
||||
[self.navigationInfoView addToView:self.ownerView];
|
||||
self.navigationInfoView.state = MWMNavigationInfoViewStateNavigation;
|
||||
[MWMMapViewControlsManager manager].searchHidden = YES;
|
||||
}
|
||||
|
||||
|
@ -209,6 +237,7 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
[startButton setTitle:t forState:UIControlStateDisabled];
|
||||
}
|
||||
|
||||
- (void)onRoutePointsUpdated { [self.navigationInfoView onRoutePointsUpdated]; }
|
||||
- (void)setMenuErrorStateWithErrorMessage:(NSString *)message
|
||||
{
|
||||
[self.delegate setRoutingErrorMessage:message];
|
||||
|
@ -274,7 +303,7 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
self.navigationInfoView.leftBound = leftBound;
|
||||
}
|
||||
|
||||
- (CGFloat)leftHeight
|
||||
- (CGFloat)leftTop
|
||||
{
|
||||
switch (self.state)
|
||||
{
|
||||
|
@ -288,7 +317,7 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
}
|
||||
}
|
||||
|
||||
- (CGFloat)rightHeight
|
||||
- (CGFloat)rightTop
|
||||
{
|
||||
switch (self.state)
|
||||
{
|
||||
|
@ -302,6 +331,35 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
}
|
||||
}
|
||||
|
||||
- (CGFloat)bottom
|
||||
{
|
||||
auto ov = self.ownerView;
|
||||
switch (self.state)
|
||||
{
|
||||
case MWMNavigationDashboardStateHidden: return ov.height;
|
||||
case MWMNavigationDashboardStatePlanning:
|
||||
case MWMNavigationDashboardStateReady:
|
||||
case MWMNavigationDashboardStateError:
|
||||
case MWMNavigationDashboardStatePrepare:
|
||||
case MWMNavigationDashboardStateNavigation:
|
||||
return IPAD ? ov.height : self.navigationInfoView.bottom;
|
||||
}
|
||||
}
|
||||
|
||||
- (CGFloat)left
|
||||
{
|
||||
switch (self.state)
|
||||
{
|
||||
case MWMNavigationDashboardStateHidden: return 0.0;
|
||||
case MWMNavigationDashboardStatePlanning:
|
||||
case MWMNavigationDashboardStateReady:
|
||||
case MWMNavigationDashboardStateError:
|
||||
case MWMNavigationDashboardStatePrepare:
|
||||
case MWMNavigationDashboardStateNavigation:
|
||||
return self.leftBound + (IPAD ? 0 : self.navigationInfoView.left);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)addInfoDisplay:(TInfoDisplay)infoDisplay { [self.infoDisplays addObject:infoDisplay]; }
|
||||
- (NSString *)startButtonTitle
|
||||
{
|
||||
|
@ -309,6 +367,7 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
return L(@"p2p_start");
|
||||
return self.taxiDataSource.isTaxiInstalled ? L(@"taxi_order") : L(@"install_app");
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (MWMRoutePreview *)routePreview
|
||||
|
@ -330,6 +389,8 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>;
|
|||
if (!_navigationInfoView)
|
||||
{
|
||||
[NSBundle.mainBundle loadNibNamed:kNavigationInfoViewXibName owner:self options:nil];
|
||||
_navigationInfoView.state = MWMNavigationInfoViewStateHidden;
|
||||
_navigationInfoView.ownerView = self.ownerView;
|
||||
[self addInfoDisplay:_navigationInfoView];
|
||||
}
|
||||
return _navigationInfoView;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#import "MWMTextToSpeech.h"
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "Statistics.h"
|
||||
|
||||
#include "LocaleTranslator.h"
|
||||
|
@ -153,7 +154,7 @@ vector<pair<string, string>> availableLanguages()
|
|||
if (active && ![self isValid])
|
||||
[self createSynthesizer];
|
||||
[self setAudioSessionActive:active];
|
||||
GetFramework().GetRoutingManager().EnableTurnNotifications(active ? true : false);
|
||||
[MWMRouter enableTurnNotifications:active];
|
||||
runAsyncOnMainQueue(^{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:[[self class] ttsStatusNotificationKey]
|
||||
|
@ -164,10 +165,7 @@ vector<pair<string, string>> availableLanguages()
|
|||
|
||||
- (BOOL)active
|
||||
{
|
||||
return [[self class] isTTSEnabled] &&
|
||||
GetFramework().GetRoutingManager().AreTurnNotificationsEnabled()
|
||||
? YES
|
||||
: NO;
|
||||
return [[self class] isTTSEnabled] && [MWMRouter areTurnNotificationsEnabled];
|
||||
}
|
||||
|
||||
+ (NSString *)savedLanguage
|
||||
|
@ -225,7 +223,7 @@ vector<pair<string, string>> availableLanguages()
|
|||
LOG(LERROR, ("Cannot convert UI locale or default locale to twine language. MWMTextToSpeech "
|
||||
"is invalid."));
|
||||
else
|
||||
GetFramework().GetRoutingManager().SetTurnNotificationsLocale(twineLang);
|
||||
[MWMRouter setTurnNotificationsLocale:@(twineLang.c_str())];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -245,18 +243,12 @@ vector<pair<string, string>> availableLanguages()
|
|||
|
||||
- (void)playTurnNotifications
|
||||
{
|
||||
auto & routingManager = GetFramework().GetRoutingManager();
|
||||
if (!routingManager.IsRoutingActive())
|
||||
if (![MWMRouter isRoutingActive] || ![self isValid])
|
||||
return;
|
||||
|
||||
vector<string> notifications;
|
||||
routingManager.GenerateTurnNotifications(notifications);
|
||||
|
||||
if (![self isValid])
|
||||
return;
|
||||
|
||||
for (auto const & text : notifications)
|
||||
[self speakOneString:@(text.c_str())];
|
||||
NSArray<NSString *> * turnNotifications = [MWMRouter turnNotifications];
|
||||
for (NSString * notification in turnNotifications)
|
||||
[self speakOneString:notification];
|
||||
}
|
||||
|
||||
- (BOOL)setAudioSessionActive:(BOOL)audioSessionActive
|
||||
|
|
|
@ -12,17 +12,26 @@ enum class NavigationSearchState
|
|||
MinimizedATM
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MWMNavigationInfoViewState) {
|
||||
MWMNavigationInfoViewStateHidden,
|
||||
MWMNavigationInfoViewStatePrepare,
|
||||
MWMNavigationInfoViewStateNavigation
|
||||
};
|
||||
|
||||
@interface MWMNavigationInfoView : UIView<MWMNavigationDashboardInfoProtocol>
|
||||
|
||||
@property(nonatomic) CGFloat topBound;
|
||||
@property(nonatomic) CGFloat leftBound;
|
||||
@property(nonatomic, readonly) CGFloat leftHeight;
|
||||
@property(nonatomic, readonly) CGFloat rightHeight;
|
||||
@property(nonatomic, readonly) CGFloat bottom;
|
||||
@property(nonatomic, readonly) CGFloat left;
|
||||
@property(nonatomic, readonly) NavigationSearchState searchState;
|
||||
|
||||
- (void)addToView:(UIView *)superview;
|
||||
- (void)remove;
|
||||
@property(nonatomic) MWMNavigationInfoViewState state;
|
||||
@property(weak, nonatomic) UIView * ownerView;
|
||||
|
||||
- (void)setMapSearch;
|
||||
|
||||
- (void)onRoutePointsUpdated;
|
||||
|
||||
@end
|
|
@ -11,6 +11,7 @@
|
|||
#import "MWMRouter.h"
|
||||
#import "MWMSearch.h"
|
||||
#import "MapViewController.h"
|
||||
#import "SwiftBridge.h"
|
||||
#import "UIImageView+Coloring.h"
|
||||
|
||||
#include "geometry/angles.hpp"
|
||||
|
@ -69,6 +70,7 @@ BOOL defaultOrientation(CGSize const & size)
|
|||
|
||||
@property(weak, nonatomic) IBOutlet UIView * searchButtonsView;
|
||||
@property(weak, nonatomic) IBOutlet MWMButton * searchMainButton;
|
||||
@property(weak, nonatomic) IBOutlet MWMButton * bookmarksButton;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * searchButtonsViewHeight;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * searchButtonsViewWidth;
|
||||
@property(nonatomic) IBOutletCollection(NSLayoutConstraint) NSArray * searchLandscapeConstraints;
|
||||
|
@ -81,6 +83,9 @@ BOOL defaultOrientation(CGSize const & size)
|
|||
@property(weak, nonatomic) IBOutlet MWMButton * searchATMButton;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * turnsTopOffset;
|
||||
|
||||
@property(weak, nonatomic) IBOutlet MWMNavigationAddPointToastView * toastView;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * toastViewHideOffset;
|
||||
|
||||
@property(nonatomic, readwrite) NavigationSearchState searchState;
|
||||
@property(nonatomic) BOOL isVisible;
|
||||
|
||||
|
@ -90,18 +95,6 @@ BOOL defaultOrientation(CGSize const & size)
|
|||
|
||||
@implementation MWMNavigationInfoView
|
||||
|
||||
- (void)addToView:(UIView *)superview
|
||||
{
|
||||
self.isVisible = YES;
|
||||
[self setSearchState:NavigationSearchState::MinimizedNormal animated:NO];
|
||||
self.turnsWidth.constant = IPAD ? kTurnsiPadWidth : kTurnsiPhoneWidth;
|
||||
NSAssert(superview != nil, @"Superview can't be nil");
|
||||
if ([superview.subviews containsObject:self])
|
||||
return;
|
||||
[superview insertSubview:self atIndex:0];
|
||||
}
|
||||
|
||||
- (void)remove { self.isVisible = NO; }
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
|
@ -111,14 +104,37 @@ BOOL defaultOrientation(CGSize const & size)
|
|||
[[MWMMapViewControlsManager manager] navigationDashBoardDidUpdate];
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
|
||||
if (!self.isVisible)
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (CGFloat)leftHeight { return self.turnsView.maxY; }
|
||||
- (CGFloat)rightHeight { return self.streetNameView.hidden ? 0 : self.streetNameView.maxY; }
|
||||
- (CGFloat)bottom { return self.toastView.minY; }
|
||||
- (CGFloat)left
|
||||
{
|
||||
auto sv = self.superview;
|
||||
BOOL const isLandscape = sv.width > sv.height;
|
||||
return isLandscape ? self.searchMainButton.maxX : 0;
|
||||
}
|
||||
|
||||
- (void)setMapSearch { [self setSearchState:NavigationSearchState::MinimizedSearch animated:YES]; }
|
||||
- (void)onRoutePointsUpdated
|
||||
{
|
||||
if (![MWMRouter startPoint])
|
||||
{
|
||||
[self.toastView configWithText:L(@"planning_route_need_start") withActionButton:YES];
|
||||
[self setToastViewHidden:NO];
|
||||
}
|
||||
else if (![MWMRouter finishPoint])
|
||||
{
|
||||
[self.toastView configWithText:L(@"planning_route_need_finish") withActionButton:NO];
|
||||
[self setToastViewHidden:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setToastViewHidden:YES];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Search
|
||||
|
||||
- (IBAction)searchMainButtonTouchUpInside
|
||||
|
@ -130,7 +146,14 @@ BOOL defaultOrientation(CGSize const & size)
|
|||
[self setSearchState:NavigationSearchState::MinimizedNormal animated:YES];
|
||||
break;
|
||||
case NavigationSearchState::MinimizedNormal:
|
||||
[self setSearchState:NavigationSearchState::Maximized animated:YES];
|
||||
if (self.state == MWMNavigationInfoViewStatePrepare)
|
||||
{
|
||||
[MWMMapViewControlsManager manager].searchHidden = NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setSearchState:NavigationSearchState::Maximized animated:YES];
|
||||
}
|
||||
break;
|
||||
case NavigationSearchState::MinimizedSearch:
|
||||
case NavigationSearchState::MinimizedGas:
|
||||
|
@ -167,15 +190,19 @@ BOOL defaultOrientation(CGSize const & size)
|
|||
body(NavigationSearchState::MinimizedATM);
|
||||
}
|
||||
|
||||
- (IBAction)bookmarksButtonTouchUpInside { [[MapViewController controller] openBookmarks]; }
|
||||
- (void)collapseSearchOnTimer
|
||||
{
|
||||
[self setSearchState:NavigationSearchState::MinimizedNormal animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - MWMNavigationDashboardInfoProtocol
|
||||
|
||||
- (void)updateNavigationInfo:(MWMNavigationDashboardEntity *)info
|
||||
{
|
||||
self.navigationInfo = info;
|
||||
if (self.state != MWMNavigationInfoViewStateNavigation)
|
||||
return;
|
||||
if (info.streetName.length != 0)
|
||||
{
|
||||
self.streetNameView.hidden = NO;
|
||||
|
@ -374,14 +401,48 @@ BOOL defaultOrientation(CGSize const & size)
|
|||
self.searchMainButton.imageName = kSearchStateButtonImageNames.at(searchState);
|
||||
}
|
||||
|
||||
- (void)setState:(MWMNavigationInfoViewState)state
|
||||
{
|
||||
_state = state;
|
||||
switch (state)
|
||||
{
|
||||
case MWMNavigationInfoViewStateHidden: self.isVisible = NO; break;
|
||||
case MWMNavigationInfoViewStateNavigation:
|
||||
self.isVisible = YES;
|
||||
if ([MWMRouter type] == MWMRouterTypePedestrian)
|
||||
[MWMLocationManager addObserver:self];
|
||||
else
|
||||
[MWMLocationManager removeObserver:self];
|
||||
break;
|
||||
case MWMNavigationInfoViewStatePrepare:
|
||||
self.isVisible = YES;
|
||||
self.streetNameView.hidden = YES;
|
||||
self.turnsView.hidden = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setIsVisible:(BOOL)isVisible
|
||||
{
|
||||
_isVisible = isVisible;
|
||||
[self setNeedsLayout];
|
||||
if (isVisible && [MWMRouter router].type == MWMRouterTypePedestrian)
|
||||
[MWMLocationManager addObserver:self];
|
||||
if (_isVisible == isVisible)
|
||||
return;
|
||||
_isVisible = isVisible;
|
||||
if (isVisible)
|
||||
{
|
||||
self.bookmarksButton.imageName = @"ic_routing_bookmark";
|
||||
[self setSearchState:NavigationSearchState::MinimizedNormal animated:NO];
|
||||
self.turnsWidth.constant = IPAD ? kTurnsiPadWidth : kTurnsiPhoneWidth;
|
||||
UIView * sv = self.ownerView;
|
||||
NSAssert(sv != nil, @"Superview can't be nil");
|
||||
if ([sv.subviews containsObject:self])
|
||||
return;
|
||||
[sv insertSubview:self atIndex:0];
|
||||
}
|
||||
else
|
||||
[MWMLocationManager removeObserver:self];
|
||||
{
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
}
|
||||
|
||||
- (CGRect)defaultFrame
|
||||
|
@ -403,4 +464,15 @@ BOOL defaultOrientation(CGSize const & size)
|
|||
[self setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)setToastViewHidden:(BOOL)hidden
|
||||
{
|
||||
[self setNeedsLayout];
|
||||
self.toastViewHideOffset.priority =
|
||||
hidden ? UILayoutPriorityDefaultHigh : UILayoutPriorityDefaultLow;
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
[self layoutIfNeeded];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
@ -17,14 +17,62 @@
|
|||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MWMNavigationInfoView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pei-0V-lM7" customClass="MWMNavigationAddPointToastView">
|
||||
<rect key="frame" x="0.0" y="1366" width="1024" height="20"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="aJu-Io-wpV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1024" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="751" horizontalCompressionResistancePriority="400" text="Добавьте стартовую точку для планирования маршрута." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nT5-UU-d1c">
|
||||
<rect key="frame" x="16" y="12" width="453.5" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="900" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="OtJ-Fs-9VY">
|
||||
<rect key="frame" x="888" y="0.0" width="136" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" priority="250" constant="44" id="wLF-3Z-FaU"/>
|
||||
</constraints>
|
||||
<inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="2" maxY="0.0"/>
|
||||
<inset key="titleEdgeInsets" minX="4" minY="0.0" maxX="-4" maxY="0.0"/>
|
||||
<inset key="imageEdgeInsets" minX="-4" minY="0.0" maxX="4" maxY="0.0"/>
|
||||
<state key="normal" title="Истользовать" image="ic_get_position"/>
|
||||
<connections>
|
||||
<action selector="addLocationRoutePoint" destination="-1" eventType="touchUpInside" id="5dQ-1Q-u0o"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="OtJ-Fs-9VY" firstAttribute="top" secondItem="nT5-UU-d1c" secondAttribute="bottom" priority="250" id="3Rz-sS-o8e"/>
|
||||
<constraint firstItem="OtJ-Fs-9VY" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="nT5-UU-d1c" secondAttribute="trailing" priority="500" constant="16" id="CTQ-m1-zpW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="nT5-UU-d1c" secondAttribute="bottom" priority="500" constant="12" id="DRp-LQ-V6O"/>
|
||||
<constraint firstAttribute="bottom" secondItem="OtJ-Fs-9VY" secondAttribute="bottom" priority="750" id="GPI-44-Zxz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OtJ-Fs-9VY" secondAttribute="trailing" id="HNP-Vm-Kxv"/>
|
||||
<constraint firstItem="nT5-UU-d1c" firstAttribute="leading" secondItem="aJu-Io-wpV" secondAttribute="leading" constant="16" id="SH6-LI-eFK"/>
|
||||
<constraint firstItem="OtJ-Fs-9VY" firstAttribute="top" secondItem="aJu-Io-wpV" secondAttribute="top" priority="500" id="jGq-7m-tAl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="nT5-UU-d1c" secondAttribute="trailing" priority="250" constant="16" id="pa6-hM-C5h"/>
|
||||
<constraint firstItem="nT5-UU-d1c" firstAttribute="top" secondItem="aJu-Io-wpV" secondAttribute="top" constant="12" id="tyt-8u-Kh9"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<blurEffect style="dark"/>
|
||||
<connections>
|
||||
<outlet property="actionButton" destination="OtJ-Fs-9VY" id="dHa-tU-xzk"/>
|
||||
<outlet property="actionButtonHidden" destination="GPI-44-Zxz" id="e0I-oS-aBg"/>
|
||||
<outlet property="descriptionLabel" destination="nT5-UU-d1c" id="dFc-Yg-Fkl"/>
|
||||
<outletCollection property="multilineConstraints" destination="wLF-3Z-FaU" collectionClass="NSMutableArray" id="2Xn-Vv-34b"/>
|
||||
<outletCollection property="multilineConstraints" destination="3Rz-sS-o8e" collectionClass="NSMutableArray" id="rTW-2L-6fR"/>
|
||||
<outletCollection property="multilineConstraints" destination="pa6-hM-C5h" collectionClass="NSMutableArray" id="EMp-Ge-oaP"/>
|
||||
</connections>
|
||||
</visualEffectView>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YYv-pG-Wkw" userLabel="Street name" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="65.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="1024" height="65.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ленинградский проспект" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ShI-bz-5g8">
|
||||
<rect key="frame" x="112" y="32" width="255" height="21.5"/>
|
||||
<rect key="frame" x="112" y="32" width="904" height="21.5"/>
|
||||
<accessibility key="accessibilityConfiguration">
|
||||
<accessibilityTraits key="traits" staticText="YES" notEnabled="YES"/>
|
||||
</accessibility>
|
||||
|
@ -61,8 +109,20 @@
|
|||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XMv-au-OYf" customClass="MWMButton">
|
||||
<rect key="frame" x="6" y="623" width="56" height="56"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="56" id="ehZ-Oc-96g"/>
|
||||
<constraint firstAttribute="height" constant="56" id="p3i-Ly-sTx"/>
|
||||
</constraints>
|
||||
<state key="normal" image="ic_routing_search_light"/>
|
||||
<connections>
|
||||
<action selector="bookmarksButtonTouchUpInside" destination="iN0-l3-epB" eventType="touchUpInside" id="YwB-gA-E8p"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TMW-aw-1RT">
|
||||
<rect key="frame" x="-66" y="265.5" width="200" height="200"/>
|
||||
<rect key="frame" x="-66" y="615" width="200" height="200"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Bv-7H-IZt" userLabel="Gas" customClass="MWMButton">
|
||||
<rect key="frame" x="78" y="14" width="44" height="44"/>
|
||||
|
@ -165,7 +225,7 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Xna-Q1-7zW" customClass="MWMButton">
|
||||
<rect key="frame" x="6" y="337.5" width="56" height="56"/>
|
||||
<rect key="frame" x="6" y="687" width="56" height="56"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="56" id="IJq-4U-XHW"/>
|
||||
|
@ -304,20 +364,28 @@
|
|||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="Xna-Q1-7zW" secondAttribute="bottom" priority="250" constant="46" id="0qY-1y-NiH"/>
|
||||
<constraint firstAttribute="trailing" secondItem="YYv-pG-Wkw" secondAttribute="trailing" id="15D-kN-gda"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Pei-0V-lM7" secondAttribute="trailing" id="26j-tD-P9y"/>
|
||||
<constraint firstItem="TMW-aw-1RT" firstAttribute="centerY" secondItem="Xna-Q1-7zW" secondAttribute="centerY" id="652-PO-iav"/>
|
||||
<constraint firstItem="YYv-pG-Wkw" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="IBQ-gK-Cpe"/>
|
||||
<constraint firstItem="Xna-Q1-7zW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="6" id="J7x-54-WT5"/>
|
||||
<constraint firstItem="Pei-0V-lM7" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="bottom" priority="750" id="JqF-da-c1k"/>
|
||||
<constraint firstItem="Xna-Q1-7zW" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" priority="500" constant="32" id="KQb-ju-1bf"/>
|
||||
<constraint firstItem="YYv-pG-Wkw" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Rd5-Hl-fSF"/>
|
||||
<constraint firstItem="Pei-0V-lM7" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="TvX-b3-3Sa"/>
|
||||
<constraint firstItem="XMv-au-OYf" firstAttribute="centerX" secondItem="Xna-Q1-7zW" secondAttribute="centerX" id="XwW-6c-UzJ"/>
|
||||
<constraint firstItem="TMW-aw-1RT" firstAttribute="leading" secondItem="Xna-Q1-7zW" secondAttribute="leading" priority="250" constant="-2" id="Y9b-UG-buF"/>
|
||||
<constraint firstItem="TMW-aw-1RT" firstAttribute="centerX" secondItem="Xna-Q1-7zW" secondAttribute="centerX" priority="500" id="ctJ-SL-eKZ"/>
|
||||
<constraint firstItem="Aa6-N8-acP" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="28" id="goU-O7-rpS"/>
|
||||
<constraint firstItem="ShI-bz-5g8" firstAttribute="leading" secondItem="Aa6-N8-acP" secondAttribute="trailing" priority="999" constant="8" id="mdA-B9-tvQ"/>
|
||||
<constraint firstItem="Pei-0V-lM7" firstAttribute="top" secondItem="Xna-Q1-7zW" secondAttribute="bottom" priority="250" constant="12" id="pFP-r6-dGK"/>
|
||||
<constraint firstItem="Aa6-N8-acP" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="8" id="pXD-dk-ku2"/>
|
||||
<constraint firstItem="Xna-Q1-7zW" firstAttribute="top" secondItem="XMv-au-OYf" secondAttribute="bottom" constant="8" id="tEP-Qf-uBZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Pei-0V-lM7" secondAttribute="bottom" priority="500" id="yP1-ip-l24"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="bookmarksButton" destination="XMv-au-OYf" id="g3E-jo-X2E"/>
|
||||
<outlet property="distanceToNextTurnLabel" destination="KuR-1J-VI2" id="n0i-t9-Vj2"/>
|
||||
<outlet property="nextTurnImageView" destination="AJe-8N-rpk" id="iMm-9u-rPI"/>
|
||||
<outlet property="roundTurnLabel" destination="teB-QQ-oib" id="5p2-zz-Pe9"/>
|
||||
|
@ -334,6 +402,8 @@
|
|||
<outlet property="secondTurnView" destination="8Zu-Ff-6p2" id="yEK-rY-S50"/>
|
||||
<outlet property="streetNameLabel" destination="ShI-bz-5g8" id="eZd-Es-g0l"/>
|
||||
<outlet property="streetNameView" destination="YYv-pG-Wkw" id="gbk-SH-idq"/>
|
||||
<outlet property="toastView" destination="Pei-0V-lM7" id="gTw-kd-UAJ"/>
|
||||
<outlet property="toastViewHideOffset" destination="JqF-da-c1k" id="WtX-JJ-0lS"/>
|
||||
<outlet property="turnsTopOffset" destination="goU-O7-rpS" id="MEy-6X-7Qq"/>
|
||||
<outlet property="turnsView" destination="Aa6-N8-acP" id="daB-uQ-UFM"/>
|
||||
<outlet property="turnsWidth" destination="6Ja-Xp-g8h" id="kCr-a1-fph"/>
|
||||
|
@ -361,12 +431,14 @@
|
|||
<outletCollection property="searchButtonsSideSize" destination="euI-Cb-zo4" id="W8L-Ax-Ks1"/>
|
||||
<outletCollection property="searchButtons" destination="RP3-01-Pj7" id="1nL-Ib-y49"/>
|
||||
<outletCollection property="searchButtonsSideSize" destination="UEW-5h-9Jk" id="ZWN-om-GgR"/>
|
||||
<outletCollection property="searchLandscapeConstraints" destination="0qY-1y-NiH" id="8Yg-cU-neJ"/>
|
||||
<outletCollection property="searchLandscapeConstraints" destination="Y9b-UG-buF" id="cjs-so-6PQ"/>
|
||||
<outletCollection property="searchLandscapeConstraints" destination="pFP-r6-dGK" id="p6X-D7-oom"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="33.5" y="54.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_get_position" width="20" height="20"/>
|
||||
<image name="ic_routing_atm_on" width="24" height="24"/>
|
||||
<image name="ic_routing_food_on" width="24" height="24"/>
|
||||
<image name="ic_routing_fuel_on" width="24" height="24"/>
|
|
@ -34,19 +34,20 @@
|
|||
- (void)remove { self.isVisible = NO; }
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
if (!CGRectEqualToRect(self.frame, self.defaultFrame))
|
||||
self.frame = self.defaultFrame;
|
||||
CGFloat const sbHeight = statusBarHeight();
|
||||
self.statusbarBackground.frame = CGRectMake(0.0, -sbHeight, self.width, sbHeight);
|
||||
[self.delegate navigationDashBoardDidUpdate];
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
if (!self.isVisible)
|
||||
if (self.isVisible)
|
||||
[self.delegate navigationDashBoardDidUpdate];
|
||||
else
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
[super layoutSubviews];
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
@objc(MWMNavigationAddPointToastView)
|
||||
final class NavigationAddPointToastView: UIVisualEffectView {
|
||||
@IBOutlet private var descriptionLabel: UILabel! {
|
||||
didSet {
|
||||
descriptionLabel.font = UIFont.regular14()
|
||||
descriptionLabel.textColor = UIColor.whitePrimaryText()
|
||||
}
|
||||
}
|
||||
@IBOutlet private var actionButton: UIButton! {
|
||||
didSet {
|
||||
actionButton.setTitle(L("button_use"), for: .normal)
|
||||
actionButton.setTitleColor(UIColor.linkBlue(), for: .normal)
|
||||
actionButton.tintColor = UIColor.linkBlue()
|
||||
actionButton.titleLabel?.font = UIFont.regular17()
|
||||
|
||||
let flipTransform = CGAffineTransform(scaleX: -1, y: 1)
|
||||
actionButton.transform = flipTransform
|
||||
actionButton.titleLabel?.transform = flipTransform
|
||||
actionButton.imageView?.transform = flipTransform
|
||||
}
|
||||
}
|
||||
@IBOutlet private var actionButtonHidden: NSLayoutConstraint!
|
||||
|
||||
@IBOutlet private var multilineConstraints: [NSLayoutConstraint]!
|
||||
|
||||
func config(text: String, withActionButton: Bool) {
|
||||
descriptionLabel.text = text
|
||||
|
||||
setNeedsLayout()
|
||||
if withActionButton {
|
||||
actionButtonHidden.priority = UILayoutPriorityDefaultHigh
|
||||
actionButton.isHidden = false
|
||||
} else {
|
||||
actionButtonHidden.priority = UILayoutPriorityDefaultLow
|
||||
actionButton.isHidden = true
|
||||
}
|
||||
UIView.animate(withDuration: kDefaultAnimationDuration) { self.layoutIfNeeded() }
|
||||
}
|
||||
|
||||
private var recentSuperviewSize: CGSize? {
|
||||
didSet {
|
||||
guard recentSuperviewSize != oldValue else { return }
|
||||
DispatchQueue.main.async {
|
||||
self.descriptionLabelLines = self.descriptionLabel.numberOfVisibleLines
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var descriptionLabelLines = 0 {
|
||||
didSet {
|
||||
guard descriptionLabelLines != oldValue else { return }
|
||||
let priority: UILayoutPriority
|
||||
if recentSuperviewSize!.width > recentSuperviewSize!.height {
|
||||
priority = UILayoutPriorityDefaultLow
|
||||
} else {
|
||||
priority = descriptionLabelLines > 1 ? UILayoutPriorityDefaultHigh : UILayoutPriorityDefaultLow
|
||||
}
|
||||
multilineConstraints.forEach { $0.priority = priority }
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
recentSuperviewSize = superview?.frame.size
|
||||
}
|
||||
}
|
|
@ -185,11 +185,11 @@ CGFloat constexpr kAdditionalHeight = 20.;
|
|||
if (![MWMRouter hasRouteAltitude])
|
||||
return;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[[MWMRouter router] routeAltitudeImageForSize:self.heightProfileImage.frame.size
|
||||
completion:^(UIImage * image, NSString * altitudeElevation) {
|
||||
self.heightProfileImage.image = image;
|
||||
self.elevationHeight.text = altitudeElevation;
|
||||
}];
|
||||
[MWMRouter routeAltitudeImageForSize:self.heightProfileImage.frame.size
|
||||
completion:^(UIImage * image, NSString * altitudeElevation) {
|
||||
self.heightProfileImage.image = image;
|
||||
self.elevationHeight.text = altitudeElevation;
|
||||
}];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,6 @@ CGFloat constexpr kAdditionalHeight = 20.;
|
|||
[super layoutSubviews];
|
||||
[self setupActualHeight];
|
||||
[self.delegate routePreviewDidChangeFrame:self.frame];
|
||||
[super layoutSubviews];
|
||||
}
|
||||
|
||||
- (void)router:(MWMRouterType)routerType setState:(MWMCircularProgressState)state
|
||||
|
@ -247,9 +246,8 @@ CGFloat constexpr kAdditionalHeight = 20.;
|
|||
continue;
|
||||
auto const routerType = prg.first;
|
||||
[self selectRouter:routerType];
|
||||
MWMRouter * router = [MWMRouter router];
|
||||
router.type = routerType;
|
||||
[router rebuildWithBestRouter:NO];
|
||||
[MWMRouter setType:routerType];
|
||||
[MWMRouter rebuildWithBestRouter:NO];
|
||||
switch (routerType)
|
||||
{
|
||||
case MWMRouterTypeVehicle:
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#import "MWMTaxiPreviewDataSource.h"
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMNetworkPolicy.h"
|
||||
#import "MWMRoutePoint.h"
|
||||
#import "MWMTaxiPreviewCell.h"
|
||||
#import "SwiftBridge.h"
|
||||
|
||||
|
@ -104,8 +103,8 @@ using namespace uber;
|
|||
{
|
||||
NSAssert(completion && failure, @"Completion and failure blocks must be not nil!");
|
||||
m_products.clear();
|
||||
m_from = routePointLatLon(from);
|
||||
m_to = routePointLatLon(to);
|
||||
m_from = ms::LatLon(from.latitude, from.longitude);
|
||||
m_to = ms::LatLon(to.latitude, to.longitude);
|
||||
auto cv = self.collectionView;
|
||||
cv.hidden = YES;
|
||||
cv.pageControl.hidden = YES;
|
||||
|
|
|
@ -9,13 +9,6 @@
|
|||
@class MapViewController;
|
||||
@class LocationManager;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MWMRoutingPlaneMode) {
|
||||
MWMRoutingPlaneModeNone,
|
||||
MWMRoutingPlaneModePlacePage,
|
||||
MWMRoutingPlaneModeSearchSource,
|
||||
MWMRoutingPlaneModeSearchDestination
|
||||
};
|
||||
|
||||
@interface MapsAppDelegate
|
||||
: UIResponder<UIApplicationDelegate, UIAlertViewDelegate, DownloadIndicatorProtocol>
|
||||
{
|
||||
|
@ -26,7 +19,6 @@ typedef NS_ENUM(NSUInteger, MWMRoutingPlaneMode) {
|
|||
}
|
||||
|
||||
@property(nonatomic) UIWindow * window;
|
||||
@property(nonatomic) MWMRoutingPlaneMode routingPlaneMode;
|
||||
|
||||
@property(nonatomic, readonly) MapViewController * mapViewController;
|
||||
@property(nonatomic, readonly) BOOL isDrapeEngineCreated;
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
#import "MWMAuthorizationCommon.h"
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMController.h"
|
||||
#import "MWMCoreRouterType.h"
|
||||
#import "MWMFrameworkListener.h"
|
||||
#import "MWMFrameworkObservers.h"
|
||||
#import "MWMKeyboard.h"
|
||||
#import "MWMLocationManager.h"
|
||||
#import "MWMMapViewControlsManager.h"
|
||||
#import "MWMPushNotifications.h"
|
||||
#import "MWMRoutePoint.h"
|
||||
#import "MWMRoutePoint+CPP.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MWMRouterSavedState.h"
|
||||
#import "MWMSearch+CoreSpotlight.h"
|
||||
|
@ -235,14 +236,29 @@ using namespace osm_auth_ios;
|
|||
case ParsedMapApi::ParsingResult::Route:
|
||||
{
|
||||
auto const parsedData = f.GetParsedRoutingData();
|
||||
f.GetRoutingManager().SetRouter(parsedData.m_type);
|
||||
MWMRouter.type = routerType(parsedData.m_type);
|
||||
auto const points = parsedData.m_points;
|
||||
auto const & p1 = points[0];
|
||||
auto const & p2 = points[1];
|
||||
if (points.size() == 2)
|
||||
{
|
||||
auto p1 = [[MWMRoutePoint alloc] initWithURLSchemeRoutePoint:points.front()
|
||||
type:MWMRoutePointTypeStart];
|
||||
auto p2 = [[MWMRoutePoint alloc] initWithURLSchemeRoutePoint:points.back()
|
||||
type:MWMRoutePointTypeFinish];
|
||||
[MWMRouter buildFromPoint:p1 toPoint:p2 bestRouter:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef OMIM_PRODUCTION
|
||||
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
|
||||
code:5
|
||||
userInfo:@{
|
||||
@"Description" : @"Invalid number of route points",
|
||||
@"URL" : m_mwmURL
|
||||
}];
|
||||
[[Crashlytics sharedInstance] recordError:err];
|
||||
#endif
|
||||
}
|
||||
|
||||
[[MWMRouter router] buildFromPoint:routePoint(p1.m_org, @(p1.m_name.c_str()))
|
||||
toPoint:routePoint(p2.m_org, @(p2.m_name.c_str()))
|
||||
bestRouter:NO];
|
||||
[self showMap];
|
||||
[self.mapViewController showAPIBar];
|
||||
break;
|
||||
|
@ -857,12 +873,6 @@ using namespace osm_auth_ios;
|
|||
updateInfo.m_numberOfMwmFilesToUpdate;
|
||||
}
|
||||
|
||||
- (void)setRoutingPlaneMode:(MWMRoutingPlaneMode)routingPlaneMode
|
||||
{
|
||||
_routingPlaneMode = routingPlaneMode;
|
||||
[self.mapViewController updateStatusBarStyle];
|
||||
}
|
||||
|
||||
#pragma mark - MWMFrameworkStorageObserver
|
||||
|
||||
- (void)processCountryEvent:(storage::TCountryId const &)countryId
|
||||
|
@ -945,7 +955,7 @@ using namespace osm_auth_ios;
|
|||
|
||||
- (void)showAlert:(BOOL)isRate
|
||||
{
|
||||
if (!Platform::IsConnected() || GetFramework().GetRoutingManager().IsRoutingActive())
|
||||
if (!Platform::IsConnected() || [MWMRouter isRoutingActive])
|
||||
return;
|
||||
|
||||
if (isRate)
|
||||
|
|
|
@ -98,7 +98,7 @@ using namespace storage;
|
|||
NodeAttrs nodeAttrs;
|
||||
s.GetNodeAttrs(m_countryId, nodeAttrs);
|
||||
|
||||
if (!nodeAttrs.m_present && !f.GetRoutingManager().IsRoutingActive())
|
||||
if (!nodeAttrs.m_present && ![MWMRouter isRoutingActive])
|
||||
{
|
||||
BOOL const isMultiParent = nodeAttrs.m_parentInfo.size() > 1;
|
||||
BOOL const noParrent = (nodeAttrs.m_parentInfo[0].m_id == s.GetRootId());
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
[self layoutWidgets];
|
||||
}
|
||||
|
||||
- (void)layoutWidgets
|
||||
- (void)doLayoutWidgets
|
||||
{
|
||||
if (m_skin == nullptr)
|
||||
return;
|
||||
|
@ -59,9 +59,12 @@
|
|||
{
|
||||
case gui::WIDGET_RULER:
|
||||
case gui::WIDGET_COPYRIGHT:
|
||||
pivot -= m2::PointF(0.0, ([MapViewController controller].view.height - self.bottomBound) *
|
||||
self.visualScale);
|
||||
{
|
||||
auto const vs = self.visualScale;
|
||||
pivot -= m2::PointF(-self.leftBound * vs,
|
||||
([MapViewController controller].view.height - self.bottomBound) * vs);
|
||||
break;
|
||||
}
|
||||
case gui::WIDGET_COMPASS:
|
||||
case gui::WIDGET_SCALE_LABEL:
|
||||
case gui::WIDGET_CHOOSE_POSITION_MARK: break;
|
||||
|
@ -72,6 +75,13 @@
|
|||
GetFramework().SetWidgetLayout(move(layout));
|
||||
}
|
||||
|
||||
- (void)layoutWidgets
|
||||
{
|
||||
auto doLayoutWidgets = @selector(doLayoutWidgets);
|
||||
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:doLayoutWidgets object:nil];
|
||||
[self performSelector:doLayoutWidgets withObject:nil afterDelay:0];
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (void)setFullScreen:(BOOL)fullScreen
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
typealias MercatorCoordinate = Double
|
||||
|
||||
struct MercatorCoordinate2D {
|
||||
var x: MercatorCoordinate
|
||||
var y: MercatorCoordinate
|
||||
|
||||
init() {
|
||||
x = 0
|
||||
y = 0
|
||||
}
|
||||
|
||||
init(x: MercatorCoordinate, y: MercatorCoordinate) {
|
||||
self.x = x
|
||||
self.y = y
|
||||
}
|
||||
}
|
||||
|
||||
extension MercatorCoordinate2D: Equatable {
|
||||
static func == (lhs: MercatorCoordinate2D, rhs: MercatorCoordinate2D) -> Bool {
|
||||
let eps = 1e-8
|
||||
return abs(lhs.x - rhs.x) < eps && abs(lhs.y - rhs.y) < eps
|
||||
}
|
||||
}
|
|
@ -91,7 +91,7 @@ void loopWrappers(TObservers * observers, TLoopBlock block)
|
|||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - MWMFrameworkRouteBuildingObserver
|
||||
#pragma mark - MWMFrameworkRouteBuilderObserver
|
||||
|
||||
- (void)registerRouteBuilderListener
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#import "MWMController.h"
|
||||
#import "MWMLocationObserver.h"
|
||||
#import "MWMLocationPredictor.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "Statistics.h"
|
||||
|
||||
|
@ -123,11 +124,10 @@ BOOL keepRunningInBackground()
|
|||
if (needGPSForTrackRecorder)
|
||||
return YES;
|
||||
|
||||
auto const & routingManager = GetFramework().GetRoutingManager();
|
||||
bool const isRouteBuilt = routingManager.IsRouteBuilt();
|
||||
bool const isRouteFinished = routingManager.IsRouteFinished();
|
||||
bool const isRouteRebuildingOnly = routingManager.IsRouteRebuildingOnly();
|
||||
bool const needGPSForRouting = ((isRouteBuilt || isRouteRebuildingOnly) && !isRouteFinished);
|
||||
auto const isRouteBuilt = [MWMRouter isRouteBuilt];
|
||||
auto const isRouteFinished = [MWMRouter isRouteFinished];
|
||||
auto const isRouteRebuildingOnly = [MWMRouter isRouteRebuildingOnly];
|
||||
auto const needGPSForRouting = ((isRouteBuilt || isRouteRebuildingOnly) && !isRouteFinished);
|
||||
if (needGPSForRouting)
|
||||
return YES;
|
||||
|
||||
|
@ -333,15 +333,14 @@ void setPermissionRequested()
|
|||
[manager.predictor setMyPositionMode:mode];
|
||||
[manager processLocationStatus:manager.lastLocationStatus];
|
||||
auto const & f = GetFramework();
|
||||
if (f.GetRoutingManager().IsRoutingActive())
|
||||
if ([MWMRouter isRoutingActive])
|
||||
{
|
||||
switch (f.GetRoutingManager().GetRouter())
|
||||
switch ([MWMRouter type])
|
||||
{
|
||||
case routing::RouterType::Vehicle: manager.geoMode = GeoMode::VehicleRouting; break;
|
||||
case routing::RouterType::Pedestrian: manager.geoMode = GeoMode::PedestrianRouting; break;
|
||||
case routing::RouterType::Bicycle: manager.geoMode = GeoMode::BicycleRouting; break;
|
||||
case routing::RouterType::Taxi: break;
|
||||
case routing::RouterType::Count: NSAssert(false, @"Incorrect state"); break;
|
||||
case MWMRouterTypeVehicle: manager.geoMode = GeoMode::VehicleRouting; break;
|
||||
case MWMRouterTypePedestrian: manager.geoMode = GeoMode::PedestrianRouting; break;
|
||||
case MWMRouterTypeBicycle: manager.geoMode = GeoMode::BicycleRouting; break;
|
||||
case MWMRouterTypeTaxi: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
15
iphone/Maps/Core/Routing/MWMRoutePoint+CPP.h
Normal file
15
iphone/Maps/Core/Routing/MWMRoutePoint+CPP.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#import "MWMRoutePoint.h"
|
||||
|
||||
#include "map/mwm_url.hpp"
|
||||
#include "map/routing_mark.hpp"
|
||||
|
||||
@interface MWMRoutePoint (CPP)
|
||||
|
||||
@property(nonatomic, readonly) RouteMarkData routeMarkData;
|
||||
|
||||
- (instancetype)initWithURLSchemeRoutePoint:(url_scheme::RoutePoint const &)point
|
||||
type:(MWMRoutePointType)type;
|
||||
- (instancetype)initWithRouteMarkData:(RouteMarkData const &)point;
|
||||
- (instancetype)initWithPoint:(m2::PointD const &)point type:(MWMRoutePointType)type;
|
||||
|
||||
@end
|
|
@ -1,26 +1,18 @@
|
|||
#import "SwiftBridge.h"
|
||||
typedef NS_ENUM(NSUInteger, MWMRoutePointType) {
|
||||
MWMRoutePointTypeStart,
|
||||
MWMRoutePointTypeIntermediate,
|
||||
MWMRoutePointTypeFinish
|
||||
};
|
||||
|
||||
#include "geometry/latlon.hpp"
|
||||
#include "geometry/mercator.hpp"
|
||||
#include "geometry/point2d.hpp"
|
||||
@interface MWMRoutePoint : NSObject
|
||||
|
||||
static inline MWMRoutePoint * routePoint(m2::PointD const & point, NSString * name)
|
||||
{
|
||||
return [[MWMRoutePoint alloc] initWithX:point.x y:point.y name:name isMyPosition:false];
|
||||
}
|
||||
- (instancetype)initWithLastLocationAndType:(MWMRoutePointType)type;
|
||||
|
||||
static inline MWMRoutePoint * routePoint(m2::PointD const & point)
|
||||
{
|
||||
return [[MWMRoutePoint alloc] initWithX:point.x y:point.y];
|
||||
}
|
||||
@property(copy, nonatomic, readonly) NSString * name;
|
||||
@property(nonatomic, readonly) BOOL isMyPosition;
|
||||
@property(nonatomic, readonly) MWMRoutePointType type;
|
||||
|
||||
static inline MWMRoutePoint * zeroRoutePoint() { return [[MWMRoutePoint alloc] init]; }
|
||||
static inline m2::PointD mercatorMWMRoutePoint(MWMRoutePoint * point)
|
||||
{
|
||||
return m2::PointD(point.x, point.y);
|
||||
}
|
||||
@property(nonatomic, readonly) double latitude;
|
||||
@property(nonatomic, readonly) double longitude;
|
||||
|
||||
static inline ms::LatLon routePointLatLon(MWMRoutePoint * point)
|
||||
{
|
||||
return MercatorBounds::ToLatLon(mercatorMWMRoutePoint(point));
|
||||
}
|
||||
@end
|
||||
|
|
100
iphone/Maps/Core/Routing/MWMRoutePoint.mm
Normal file
100
iphone/Maps/Core/Routing/MWMRoutePoint.mm
Normal file
|
@ -0,0 +1,100 @@
|
|||
#import "MWMRoutePoint.h"
|
||||
#import "CLLocation+Mercator.h"
|
||||
#import "MWMLocationManager.h"
|
||||
#import "MWMRoutePoint+CPP.h"
|
||||
|
||||
#include "geometry/mercator.hpp"
|
||||
#include "geometry/point2d.hpp"
|
||||
|
||||
@interface MWMRoutePoint ()
|
||||
|
||||
@property(nonatomic, readonly) m2::PointD point;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMRoutePoint
|
||||
|
||||
- (instancetype)initWithLastLocationAndType:(MWMRoutePointType)type
|
||||
{
|
||||
auto lastLocation = [MWMLocationManager lastLocation];
|
||||
if (!lastLocation)
|
||||
return nil;
|
||||
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
_point = lastLocation.mercator;
|
||||
_name = L(@"p2p_your_location");
|
||||
_isMyPosition = YES;
|
||||
_type = type;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithURLSchemeRoutePoint:(url_scheme::RoutePoint const &)point
|
||||
type:(MWMRoutePointType)type
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
_point = point.m_org;
|
||||
_name = @(point.m_name.c_str());
|
||||
_isMyPosition = NO;
|
||||
_type = type;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithRouteMarkData:(RouteMarkData const &)point
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
_point = point.m_position;
|
||||
_name = @(point.m_name.c_str());
|
||||
_isMyPosition = point.m_isMyPosition;
|
||||
switch (point.m_pointType)
|
||||
{
|
||||
case RouteMarkType::Start: _type = MWMRoutePointTypeStart; break;
|
||||
case RouteMarkType::Intermediate: _type = MWMRoutePointTypeIntermediate; break;
|
||||
case RouteMarkType::Finish: _type = MWMRoutePointTypeFinish; break;
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithPoint:(m2::PointD const &)point type:(MWMRoutePointType)type
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
_point = point;
|
||||
switch (type)
|
||||
{
|
||||
case MWMRoutePointTypeStart: _name = @"Source"; break;
|
||||
case MWMRoutePointTypeIntermediate: _name = @"Intermediate"; break;
|
||||
case MWMRoutePointTypeFinish: _name = @"Destination"; break;
|
||||
}
|
||||
_isMyPosition = NO;
|
||||
_type = type;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (double)latitude { return MercatorBounds::YToLat(self.point.y); }
|
||||
- (double)longitude { return MercatorBounds::XToLon(self.point.x); }
|
||||
- (RouteMarkData)routeMarkData
|
||||
{
|
||||
RouteMarkData pt;
|
||||
switch (self.type)
|
||||
{
|
||||
case MWMRoutePointTypeStart: pt.m_pointType = RouteMarkType::Start; break;
|
||||
case MWMRoutePointTypeIntermediate: pt.m_pointType = RouteMarkType::Intermediate; break;
|
||||
case MWMRoutePointTypeFinish: pt.m_pointType = RouteMarkType::Finish; break;
|
||||
}
|
||||
pt.m_position = self.point;
|
||||
pt.m_isMyPosition = static_cast<bool>(self.isMyPosition);
|
||||
return pt;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,40 +1,49 @@
|
|||
@class MWMRoutePoint;
|
||||
#import "MWMRoutePoint.h"
|
||||
|
||||
typedef void (^MWMImageHeightBlock)(UIImage *, NSString *);
|
||||
|
||||
@interface MWMRouter : NSObject
|
||||
|
||||
+ (MWMRouter *)router;
|
||||
|
||||
+ (BOOL)hasRouteAltitude;
|
||||
+ (BOOL)isTaxi;
|
||||
+ (BOOL)isRoutingActive;
|
||||
+ (BOOL)isRouteBuilt;
|
||||
+ (BOOL)isRouteFinished;
|
||||
+ (BOOL)isRouteRebuildingOnly;
|
||||
+ (BOOL)isOnRoute;
|
||||
|
||||
+ (BOOL)canAddIntermediatePoint;
|
||||
|
||||
+ (void)startRouting;
|
||||
+ (void)stopRouting;
|
||||
+ (BOOL)isRoutingActive;
|
||||
|
||||
@property(nonatomic, readonly) MWMRoutePoint * startPoint;
|
||||
@property(nonatomic, readonly) MWMRoutePoint * finishPoint;
|
||||
@property(nonatomic) MWMRouterType type;
|
||||
+ (NSArray<MWMRoutePoint *> *)points;
|
||||
+ (NSInteger)pointsCount;
|
||||
+ (MWMRoutePoint *)startPoint;
|
||||
+ (MWMRoutePoint *)finishPoint;
|
||||
|
||||
- (void)swapPointsAndRebuild;
|
||||
- (void)removeStartPointAndRebuild:(int)intermediateIndex;
|
||||
- (void)removeFinishPointAndRebuild:(int)intermediateIndex;
|
||||
- (void)addIntermediatePointAndRebuild:(MWMRoutePoint *)point intermediateIndex:(int)intermediateIndex;
|
||||
- (void)removeIntermediatePointAndRebuild:(int)intermediateIndex;
|
||||
- (void)buildFromPoint:(MWMRoutePoint *)start bestRouter:(BOOL)bestRouter;
|
||||
- (void)buildToPoint:(MWMRoutePoint *)finish bestRouter:(BOOL)bestRouter;
|
||||
- (void)buildFromPoint:(MWMRoutePoint *)start
|
||||
toPoint:(MWMRoutePoint *)finish
|
||||
+ (void)setType:(MWMRouterType)type;
|
||||
+ (MWMRouterType)type;
|
||||
|
||||
+ (void)disableFollowMode;
|
||||
|
||||
+ (void)enableTurnNotifications:(BOOL)active;
|
||||
+ (BOOL)areTurnNotificationsEnabled;
|
||||
+ (void)setTurnNotificationsLocale:(NSString *)locale;
|
||||
+ (NSArray<NSString *> *)turnNotifications;
|
||||
|
||||
+ (void)removeStartPointAndRebuild:(int8_t)intermediateIndex;
|
||||
+ (void)removeFinishPointAndRebuild:(int8_t)intermediateIndex;
|
||||
+ (void)addIntermediatePointAndRebuild:(MWMRoutePoint *)point
|
||||
intermediateIndex:(int8_t)intermediateIndex;
|
||||
+ (void)removeIntermediatePointAndRebuild:(int8_t)intermediateIndex;
|
||||
+ (void)buildFromPoint:(MWMRoutePoint *)start bestRouter:(BOOL)bestRouter;
|
||||
+ (void)buildToPoint:(MWMRoutePoint *)finish bestRouter:(BOOL)bestRouter;
|
||||
+ (void)buildFromPoint:(MWMRoutePoint *)startPoint
|
||||
toPoint:(MWMRoutePoint *)finishPoint
|
||||
bestRouter:(BOOL)bestRouter;
|
||||
- (void)rebuildWithBestRouter:(BOOL)bestRouter;
|
||||
- (void)routeAltitudeImageForSize:(CGSize)size completion:(MWMImageHeightBlock)block;
|
||||
+ (void)rebuildWithBestRouter:(BOOL)bestRouter;
|
||||
|
||||
- (instancetype)init __attribute__((unavailable("call +router instead")));
|
||||
- (instancetype)copy __attribute__((unavailable("call +router instead")));
|
||||
- (instancetype)copyWithZone:(NSZone *)zone __attribute__((unavailable("call +router instead")));
|
||||
+ (instancetype)alloc __attribute__((unavailable("call +router instead")));
|
||||
+ (instancetype)allocWithZone:(struct _NSZone *)zone
|
||||
__attribute__((unavailable("call +router instead")));
|
||||
+ (instancetype) new __attribute__((unavailable("call +router instead")));
|
||||
+ (BOOL)hasRouteAltitude;
|
||||
+ (void)routeAltitudeImageForSize:(CGSize)size completion:(MWMImageHeightBlock)block;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#import "MWMRouter.h"
|
||||
#import <Crashlytics/Crashlytics.h>
|
||||
#import <Pushwoosh/PushNotificationManager.h>
|
||||
#import "CLLocation+Mercator.h"
|
||||
#import "MWMAlertViewController.h"
|
||||
#import "MWMConsts.h"
|
||||
#import "MWMCoreRouterType.h"
|
||||
#import "MWMFrameworkListener.h"
|
||||
#import "MWMLocationHelpers.h"
|
||||
|
@ -9,7 +11,7 @@
|
|||
#import "MWMLocationObserver.h"
|
||||
#import "MWMMapViewControlsManager.h"
|
||||
#import "MWMNavigationDashboardManager.h"
|
||||
#import "MWMRoutePoint.h"
|
||||
#import "MWMRoutePoint+CPP.h"
|
||||
#import "MWMRouterSavedState.h"
|
||||
#import "MWMSearch.h"
|
||||
#import "MWMSettings.h"
|
||||
|
@ -26,31 +28,17 @@
|
|||
#include "platform/local_country_file_utils.hpp"
|
||||
#include "platform/measurement_utils.hpp"
|
||||
|
||||
#include "map/routing_manager.hpp"
|
||||
|
||||
using namespace routing;
|
||||
|
||||
namespace
|
||||
{
|
||||
char const * kRenderAltitudeImagesQueueLabel = "mapsme.mwmrouter.renderAltitudeImagesQueue";
|
||||
|
||||
MWMRoutePoint * lastLocationPoint()
|
||||
{
|
||||
CLLocation * lastLocation = [MWMLocationManager lastLocation];
|
||||
return lastLocation ? routePoint(lastLocation.mercator) : zeroRoutePoint();
|
||||
}
|
||||
|
||||
m2::PointD getMercator(MWMRoutePoint * p)
|
||||
{
|
||||
if (p.isMyPosition)
|
||||
return mercatorMWMRoutePoint(lastLocationPoint());
|
||||
return mercatorMWMRoutePoint(p);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@interface MWMRouter ()<MWMLocationObserver, MWMFrameworkRouteBuilderObserver>
|
||||
|
||||
@property(nonatomic, readwrite) MWMRoutePoint * startPoint;
|
||||
@property(nonatomic, readwrite) MWMRoutePoint * finishPoint;
|
||||
|
||||
@property(nonatomic) NSMutableDictionary<NSValue *, NSData *> * altitudeImagesData;
|
||||
@property(nonatomic) NSString * altitudeElevation;
|
||||
@property(nonatomic) dispatch_queue_t renderAltitudeImagesQueue;
|
||||
|
@ -76,36 +64,91 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
}
|
||||
+ (void)startRouting
|
||||
{
|
||||
auto router = [self router];
|
||||
if (![self isTaxi])
|
||||
{
|
||||
[router start];
|
||||
[self start];
|
||||
return;
|
||||
}
|
||||
|
||||
auto taxiDataSource = [MWMNavigationDashboardManager manager].taxiDataSource;
|
||||
auto eventName = taxiDataSource.isTaxiInstalled ? kStatRoutingTaxiOrder : kStatRoutingTaxiInstall;
|
||||
auto const sLatLon = routePointLatLon(router.startPoint);
|
||||
auto const fLatLon = routePointLatLon(router.finishPoint);
|
||||
auto & rm = GetFramework().GetRoutingManager();
|
||||
auto const routePoints = rm.GetRoutePoints();
|
||||
if (routePoints.size() >= 2)
|
||||
{
|
||||
auto eventName =
|
||||
taxiDataSource.isTaxiInstalled ? kStatRoutingTaxiOrder : kStatRoutingTaxiInstall;
|
||||
auto p1 = [[MWMRoutePoint alloc] initWithRouteMarkData:routePoints.front()];
|
||||
auto p2 = [[MWMRoutePoint alloc] initWithRouteMarkData:routePoints.back()];
|
||||
|
||||
[Statistics logEvent:eventName
|
||||
withParameters:@{
|
||||
kStatProvider : kStatUber,
|
||||
kStatFromLocation : makeLocationEventValue(sLatLon.lat, sLatLon.lon),
|
||||
kStatToLocation : makeLocationEventValue(fLatLon.lat, fLatLon.lon)
|
||||
}
|
||||
atLocation:[MWMLocationManager lastLocation]];
|
||||
[Statistics logEvent:eventName
|
||||
withParameters:@{
|
||||
kStatProvider : kStatUber,
|
||||
kStatFromLocation : makeLocationEventValue(p1.latitude, p1.longitude),
|
||||
kStatToLocation : makeLocationEventValue(p2.latitude, p2.longitude)
|
||||
}
|
||||
atLocation:[MWMLocationManager lastLocation]];
|
||||
}
|
||||
else
|
||||
{
|
||||
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
|
||||
code:5
|
||||
userInfo:@{
|
||||
@"Description" : @"Invalid number of taxi route points",
|
||||
@"Count" : @(routePoints.size())
|
||||
}];
|
||||
[[Crashlytics sharedInstance] recordError:err];
|
||||
}
|
||||
|
||||
[[UIApplication sharedApplication] openURL:taxiDataSource.taxiURL];
|
||||
}
|
||||
|
||||
+ (void)stopRouting
|
||||
{
|
||||
[[self router] stop];
|
||||
[self stop];
|
||||
[MWMNavigationDashboardManager manager].taxiDataSource = nil;
|
||||
}
|
||||
|
||||
+ (BOOL)isRoutingActive { return GetFramework().GetRoutingManager().IsRoutingActive(); }
|
||||
+ (BOOL)isRouteBuilt { return GetFramework().GetRoutingManager().IsRouteBuilt(); }
|
||||
+ (BOOL)isRouteFinished { return GetFramework().GetRoutingManager().IsRouteFinished(); }
|
||||
+ (BOOL)isRouteRebuildingOnly { return GetFramework().GetRoutingManager().IsRouteRebuildingOnly(); }
|
||||
+ (BOOL)isOnRoute { return GetFramework().GetRoutingManager().IsOnRoute(); }
|
||||
+ (NSArray<MWMRoutePoint *> *)routePoints
|
||||
{
|
||||
NSMutableArray<MWMRoutePoint *> * points = [@[] mutableCopy];
|
||||
auto const routePoints = GetFramework().GetRoutingManager().GetRoutePoints();
|
||||
for (auto const & routePoint : routePoints)
|
||||
[points addObject:[[MWMRoutePoint alloc] initWithRouteMarkData:routePoint]];
|
||||
return [points copy];
|
||||
}
|
||||
|
||||
+ (NSInteger)routePointsCount { return GetFramework().GetRoutingManager().GetRoutePoints().size(); }
|
||||
+ (MWMRoutePoint *)startPoint
|
||||
{
|
||||
auto const routePoints = GetFramework().GetRoutingManager().GetRoutePoints();
|
||||
if (routePoints.empty())
|
||||
return nil;
|
||||
auto const & routePoint = routePoints.front();
|
||||
if (routePoint.m_pointType == RouteMarkType::Start)
|
||||
return [[MWMRoutePoint alloc] initWithRouteMarkData:routePoint];
|
||||
return nil;
|
||||
}
|
||||
|
||||
+ (MWMRoutePoint *)finishPoint
|
||||
{
|
||||
auto const routePoints = GetFramework().GetRoutingManager().GetRoutePoints();
|
||||
if (routePoints.empty())
|
||||
return nil;
|
||||
auto const & routePoint = routePoints.back();
|
||||
if (routePoint.m_pointType == RouteMarkType::Finish)
|
||||
return [[MWMRoutePoint alloc] initWithRouteMarkData:routePoint];
|
||||
return nil;
|
||||
}
|
||||
|
||||
+ (BOOL)canAddIntermediatePoint
|
||||
{
|
||||
return GetFramework().GetRoutingManager().CouldAddIntermediatePoint();
|
||||
}
|
||||
|
||||
- (instancetype)initRouter
|
||||
{
|
||||
|
@ -115,20 +158,13 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
self.altitudeImagesData = [@{} mutableCopy];
|
||||
self.renderAltitudeImagesQueue =
|
||||
dispatch_queue_create(kRenderAltitudeImagesQueueLabel, DISPATCH_QUEUE_SERIAL);
|
||||
[self resetPoints];
|
||||
[MWMLocationManager addObserver:self];
|
||||
[MWMFrameworkListener addObserver:self];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)resetPoints
|
||||
{
|
||||
self.startPoint = lastLocationPoint();
|
||||
self.finishPoint = zeroRoutePoint();
|
||||
}
|
||||
|
||||
- (void)setType:(MWMRouterType)type
|
||||
+ (void)setType:(MWMRouterType)type
|
||||
{
|
||||
if (type == self.type)
|
||||
return;
|
||||
|
@ -136,116 +172,113 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
GetFramework().GetRoutingManager().SetRouter(coreRouterType(type));
|
||||
}
|
||||
|
||||
- (MWMRouterType)type { return routerType(GetFramework().GetRoutingManager().GetRouter()); }
|
||||
|
||||
- (void)applyRoutePoints
|
||||
+ (MWMRouterType)type { return routerType(GetFramework().GetRoutingManager().GetRouter()); }
|
||||
+ (void)disableFollowMode { GetFramework().GetRoutingManager().DisableFollowMode(); }
|
||||
+ (void)enableTurnNotifications:(BOOL)active
|
||||
{
|
||||
auto & rm = GetFramework().GetRoutingManager();
|
||||
if (self.startPoint.isValid)
|
||||
{
|
||||
RouteMarkData pt;
|
||||
pt.m_pointType = RouteMarkType::Start;
|
||||
pt.m_isMyPosition = self.startPoint.isMyPosition;
|
||||
pt.m_position = getMercator(self.startPoint);
|
||||
rm.AddRoutePoint(std::move(pt));
|
||||
}
|
||||
if (self.finishPoint.isValid)
|
||||
{
|
||||
RouteMarkData pt;
|
||||
pt.m_pointType = RouteMarkType::Finish;
|
||||
pt.m_isMyPosition = self.finishPoint.isMyPosition;
|
||||
pt.m_position = getMercator(self.finishPoint);
|
||||
rm.AddRoutePoint(std::move(pt));
|
||||
}
|
||||
GetFramework().GetRoutingManager().EnableTurnNotifications(active ? true : false);
|
||||
}
|
||||
|
||||
- (void)removeRoutePoint:(RouteMarkType)type intermediateIndex:(int)intermediateIndex
|
||||
+ (BOOL)areTurnNotificationsEnabled
|
||||
{
|
||||
auto & rm = GetFramework().GetRoutingManager();
|
||||
rm.RemoveRoutePoint(type, intermediateIndex);
|
||||
auto points = rm.GetRoutePoints();
|
||||
if (points.empty())
|
||||
{
|
||||
// No more than 1 point exist.
|
||||
if (type == RouteMarkType::Start)
|
||||
self.startPoint = zeroRoutePoint();
|
||||
else if (type == RouteMarkType::Finish)
|
||||
self.finishPoint = zeroRoutePoint();
|
||||
}
|
||||
else
|
||||
{
|
||||
// At least 2 points exist, one of them may (or may not) be my position.
|
||||
self.startPoint = rm.IsMyPosition(RouteMarkType::Start) ?
|
||||
routePoint(points.front().m_position) :
|
||||
routePoint(points.front().m_position, nil);
|
||||
self.finishPoint = rm.IsMyPosition(RouteMarkType::Finish) ?
|
||||
routePoint(points.back().m_position) :
|
||||
routePoint(points.back().m_position, nil);
|
||||
}
|
||||
return GetFramework().GetRoutingManager().AreTurnNotificationsEnabled() ? YES : NO;
|
||||
}
|
||||
|
||||
- (void)swapPointsAndRebuild
|
||||
+ (void)setTurnNotificationsLocale:(NSString *)locale
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatSwapRoutingPoints)];
|
||||
std::swap(_startPoint, _finishPoint);
|
||||
[self applyRoutePoints];
|
||||
[self rebuildWithBestRouter:NO];
|
||||
GetFramework().GetRoutingManager().SetTurnNotificationsLocale(locale.UTF8String);
|
||||
}
|
||||
|
||||
- (void)removeStartPointAndRebuild:(int)intermediateIndex
|
||||
+ (NSArray<NSString *> *)turnNotifications
|
||||
{
|
||||
[self removeRoutePoint:RouteMarkType::Start intermediateIndex:intermediateIndex];
|
||||
[self rebuildWithBestRouter:NO];
|
||||
NSMutableArray<NSString *> * turnNotifications = [@[] mutableCopy];
|
||||
vector<string> notifications;
|
||||
GetFramework().GetRoutingManager().GenerateTurnNotifications(notifications);
|
||||
for (auto const & text : notifications)
|
||||
[turnNotifications addObject:@(text.c_str())];
|
||||
return [turnNotifications copy];
|
||||
}
|
||||
|
||||
- (void)removeFinishPointAndRebuild:(int)intermediateIndex
|
||||
+ (void)removePoint:(RouteMarkType)type intermediateIndex:(int8_t)intermediateIndex
|
||||
{
|
||||
[self removeRoutePoint:RouteMarkType::Finish intermediateIndex:intermediateIndex];
|
||||
[self rebuildWithBestRouter:NO];
|
||||
GetFramework().GetRoutingManager().RemoveRoutePoint(type, intermediateIndex);
|
||||
[[MWMMapViewControlsManager manager] onRoutePointsUpdated];
|
||||
}
|
||||
|
||||
- (void)addIntermediatePointAndRebuild:(MWMRoutePoint *)point intermediateIndex:(int)intermediateIndex
|
||||
+ (void)addPoint:(MWMRoutePoint *)point intermediateIndex:(int8_t)intermediateIndex
|
||||
{
|
||||
RouteMarkData pt;
|
||||
pt.m_pointType = RouteMarkType::Intermediate;
|
||||
pt.m_position = getMercator(point);
|
||||
RouteMarkData pt = point.routeMarkData;
|
||||
pt.m_intermediateIndex = intermediateIndex;
|
||||
pt.m_isMyPosition = static_cast<bool>(point.isMyPosition);
|
||||
GetFramework().GetRoutingManager().AddRoutePoint(std::move(pt));
|
||||
[[MWMMapViewControlsManager manager] onRoutePointsUpdated];
|
||||
}
|
||||
|
||||
+ (void)addPoint:(MWMRoutePoint *)point
|
||||
{
|
||||
RouteMarkData pt = point.routeMarkData;
|
||||
GetFramework().GetRoutingManager().AddRoutePoint(std::move(pt));
|
||||
[[MWMMapViewControlsManager manager] onRoutePointsUpdated];
|
||||
}
|
||||
|
||||
+ (void)removeStartPointAndRebuild:(int8_t)intermediateIndex
|
||||
{
|
||||
[self removePoint:RouteMarkType::Start intermediateIndex:intermediateIndex];
|
||||
[self rebuildWithBestRouter:NO];
|
||||
}
|
||||
|
||||
- (void)removeIntermediatePointAndRebuild:(int)intermediateIndex
|
||||
+ (void)removeFinishPointAndRebuild:(int8_t)intermediateIndex
|
||||
{
|
||||
[self removeRoutePoint:RouteMarkType::Intermediate intermediateIndex:intermediateIndex];
|
||||
[self removePoint:RouteMarkType::Finish intermediateIndex:intermediateIndex];
|
||||
[self rebuildWithBestRouter:NO];
|
||||
}
|
||||
|
||||
- (void)buildFromPoint:(MWMRoutePoint *)startPoint bestRouter:(BOOL)bestRouter
|
||||
+ (void)addIntermediatePointAndRebuild:(MWMRoutePoint *)point
|
||||
intermediateIndex:(int8_t)intermediateIndex
|
||||
{
|
||||
self.startPoint = startPoint;
|
||||
[self applyRoutePoints];
|
||||
if (!point)
|
||||
return;
|
||||
[self addPoint:point intermediateIndex:intermediateIndex];
|
||||
[self rebuildWithBestRouter:NO];
|
||||
}
|
||||
|
||||
+ (void)removeIntermediatePointAndRebuild:(int8_t)intermediateIndex
|
||||
{
|
||||
[self removePoint:RouteMarkType::Intermediate intermediateIndex:intermediateIndex];
|
||||
[self rebuildWithBestRouter:NO];
|
||||
}
|
||||
|
||||
+ (void)buildFromPoint:(MWMRoutePoint *)startPoint bestRouter:(BOOL)bestRouter
|
||||
{
|
||||
if (!startPoint)
|
||||
return;
|
||||
[self addPoint:startPoint];
|
||||
[self rebuildWithBestRouter:bestRouter];
|
||||
}
|
||||
|
||||
- (void)buildToPoint:(MWMRoutePoint *)finishPoint bestRouter:(BOOL)bestRouter
|
||||
+ (void)buildToPoint:(MWMRoutePoint *)finishPoint bestRouter:(BOOL)bestRouter
|
||||
{
|
||||
self.finishPoint = finishPoint;
|
||||
[self applyRoutePoints];
|
||||
if (!finishPoint)
|
||||
return;
|
||||
[self addPoint:finishPoint];
|
||||
if (![self startPoint])
|
||||
[self addPoint:[[MWMRoutePoint alloc] initWithLastLocationAndType:MWMRoutePointTypeStart]];
|
||||
[self rebuildWithBestRouter:bestRouter];
|
||||
}
|
||||
|
||||
- (void)buildFromPoint:(MWMRoutePoint *)start
|
||||
toPoint:(MWMRoutePoint *)finish
|
||||
+ (void)buildFromPoint:(MWMRoutePoint *)startPoint
|
||||
toPoint:(MWMRoutePoint *)finishPoint
|
||||
bestRouter:(BOOL)bestRouter
|
||||
{
|
||||
self.startPoint = start;
|
||||
self.finishPoint = finish;
|
||||
[self applyRoutePoints];
|
||||
if (!startPoint || !finishPoint)
|
||||
return;
|
||||
|
||||
[self addPoint:startPoint];
|
||||
[self addPoint:finishPoint];
|
||||
|
||||
[self rebuildWithBestRouter:bestRouter];
|
||||
}
|
||||
|
||||
- (void)rebuildWithBestRouter:(BOOL)bestRouter
|
||||
+ (void)rebuildWithBestRouter:(BOOL)bestRouter
|
||||
{
|
||||
[self clearAltitudeImagesData];
|
||||
|
||||
|
@ -270,50 +303,65 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
}
|
||||
}
|
||||
|
||||
MWMMapViewControlsManager * mapViewControlsManager = [MWMMapViewControlsManager manager];
|
||||
[mapViewControlsManager onRoutePrepare];
|
||||
|
||||
// Taxi can't be used as best router.
|
||||
if (bestRouter && ![[self class] isTaxi])
|
||||
self.type = routerType(rm.GetBestRouter(points.front().m_position, points.back().m_position));
|
||||
|
||||
[mapViewControlsManager onRouteRebuild];
|
||||
[[MWMMapViewControlsManager manager] onRouteRebuild];
|
||||
rm.BuildRoute(0 /* timeoutSec */);
|
||||
}
|
||||
|
||||
- (void)start
|
||||
+ (void)start
|
||||
{
|
||||
auto const doStart = ^{
|
||||
if (self.startPoint.isMyPosition)
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatGo)
|
||||
withParameters:@{kStatValue : kStatFromMyPosition}];
|
||||
else if (self.finishPoint.isMyPosition)
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatGo)
|
||||
withParameters:@{kStatValue : kStatToMyPosition}];
|
||||
else
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatGo)
|
||||
withParameters:@{kStatValue : kStatPointToPoint}];
|
||||
|
||||
if (self.startPoint.isMyPosition)
|
||||
auto & rm = GetFramework().GetRoutingManager();
|
||||
auto const routePoints = rm.GetRoutePoints();
|
||||
if (routePoints.size() >= 2)
|
||||
{
|
||||
GetFramework().GetRoutingManager().FollowRoute();
|
||||
[[MWMMapViewControlsManager manager] onRouteStart];
|
||||
MapsAppDelegate * app = [MapsAppDelegate theApp];
|
||||
app.routingPlaneMode = MWMRoutingPlaneModeNone;
|
||||
[MWMRouterSavedState store];
|
||||
[MWMThemeManager setAutoUpdates:YES];
|
||||
auto p1 = [[MWMRoutePoint alloc] initWithRouteMarkData:routePoints.front()];
|
||||
auto p2 = [[MWMRoutePoint alloc] initWithRouteMarkData:routePoints.back()];
|
||||
|
||||
if (p1.isMyPosition)
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatGo)
|
||||
withParameters:@{kStatValue : kStatFromMyPosition}];
|
||||
else if (p2.isMyPosition)
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatGo)
|
||||
withParameters:@{kStatValue : kStatToMyPosition}];
|
||||
else
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatGo)
|
||||
withParameters:@{kStatValue : kStatPointToPoint}];
|
||||
|
||||
if (p1.isMyPosition)
|
||||
{
|
||||
rm.FollowRoute();
|
||||
[[MWMMapViewControlsManager manager] onRouteStart];
|
||||
[MWMRouterSavedState store];
|
||||
[MWMThemeManager setAutoUpdates:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
MWMAlertViewController * alertController = [MWMAlertViewController activeAlertController];
|
||||
CLLocation * lastLocation = [MWMLocationManager lastLocation];
|
||||
BOOL const needToRebuild = lastLocation &&
|
||||
!location_helpers::isMyPositionPendingOrNoPosition() &&
|
||||
!p2.isMyPosition;
|
||||
[alertController presentPoint2PointAlertWithOkBlock:^{
|
||||
[self buildFromPoint:[[MWMRoutePoint alloc]
|
||||
initWithLastLocationAndType:MWMRoutePointTypeStart]
|
||||
bestRouter:NO];
|
||||
}
|
||||
needToRebuild:needToRebuild];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MWMAlertViewController * alertController = [MWMAlertViewController activeAlertController];
|
||||
CLLocation * lastLocation = [MWMLocationManager lastLocation];
|
||||
BOOL const needToRebuild = lastLocation &&
|
||||
!location_helpers::isMyPositionPendingOrNoPosition() &&
|
||||
!self.finishPoint.isMyPosition;
|
||||
[alertController presentPoint2PointAlertWithOkBlock:^{
|
||||
[self buildFromPoint:lastLocationPoint() bestRouter:NO];
|
||||
}
|
||||
needToRebuild:needToRebuild];
|
||||
auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain
|
||||
code:5
|
||||
userInfo:@{
|
||||
@"Description" : @"Invalid number of route points",
|
||||
@"Count" : @(routePoints.size())
|
||||
}];
|
||||
[[Crashlytics sharedInstance] recordError:err];
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -330,16 +378,15 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
}
|
||||
}
|
||||
|
||||
- (void)stop
|
||||
+ (void)stop
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPointToPoint, kStatClose)];
|
||||
[MWMSearch clear];
|
||||
[self resetPoints];
|
||||
[self doStop:YES];
|
||||
[[MWMMapViewControlsManager manager] onRouteStop];
|
||||
}
|
||||
|
||||
- (void)doStop:(BOOL)removeRoutePoints
|
||||
+ (void)doStop:(BOOL)removeRoutePoints
|
||||
{
|
||||
// Don't save taxi routing type as default.
|
||||
if ([[self class] isTaxi])
|
||||
|
@ -347,11 +394,9 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
|
||||
[self clearAltitudeImagesData];
|
||||
GetFramework().GetRoutingManager().CloseRouting(removeRoutePoints);
|
||||
MapsAppDelegate * app = [MapsAppDelegate theApp];
|
||||
app.routingPlaneMode = MWMRoutingPlaneModeNone;
|
||||
[MWMRouterSavedState remove];
|
||||
[MWMThemeManager setAutoUpdates:NO];
|
||||
[app showAlertIfRequired];
|
||||
[MapsAppDelegate.theApp showAlertIfRequired];
|
||||
}
|
||||
|
||||
- (void)updateFollowingInfo
|
||||
|
@ -365,10 +410,12 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
[[MWMNavigationDashboardManager manager] updateFollowingInfo:info];
|
||||
}
|
||||
|
||||
- (void)routeAltitudeImageForSize:(CGSize)size completion:(MWMImageHeightBlock)block
|
||||
+ (void)routeAltitudeImageForSize:(CGSize)size completion:(MWMImageHeightBlock)block
|
||||
{
|
||||
dispatch_async(self.renderAltitudeImagesQueue, ^{
|
||||
if (![[self class] hasRouteAltitude])
|
||||
auto router = self.router;
|
||||
dispatch_async(router.renderAltitudeImagesQueue, ^{
|
||||
auto router = self.router;
|
||||
if (![self hasRouteAltitude])
|
||||
return;
|
||||
CGFloat const screenScale = [UIScreen mainScreen].scale;
|
||||
CGSize const scaledSize = {.width = size.width * screenScale,
|
||||
|
@ -379,7 +426,7 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
return;
|
||||
|
||||
NSValue * sizeValue = [NSValue valueWithCGSize:scaledSize];
|
||||
NSData * imageData = self.altitudeImagesData[sizeValue];
|
||||
NSData * imageData = router.altitudeImagesData[sizeValue];
|
||||
if (!imageData)
|
||||
{
|
||||
vector<uint8_t> imageRGBAData;
|
||||
|
@ -394,26 +441,27 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
if (imageRGBAData.empty())
|
||||
return;
|
||||
imageData = [NSData dataWithBytes:imageRGBAData.data() length:imageRGBAData.size()];
|
||||
self.altitudeImagesData[sizeValue] = imageData;
|
||||
router.altitudeImagesData[sizeValue] = imageData;
|
||||
|
||||
string heightString;
|
||||
measurement_utils::FormatDistance(maxRouteAltitude - minRouteAltitude, heightString);
|
||||
self.altitudeElevation = @(heightString.c_str());
|
||||
router.altitudeElevation = @(heightString.c_str());
|
||||
}
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
UIImage * altitudeImage = [UIImage imageWithRGBAData:imageData width:width height:height];
|
||||
if (altitudeImage)
|
||||
block(altitudeImage, self.altitudeElevation);
|
||||
block(altitudeImage, router.altitudeElevation);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
- (void)clearAltitudeImagesData
|
||||
+ (void)clearAltitudeImagesData
|
||||
{
|
||||
dispatch_async(self.renderAltitudeImagesQueue, ^{
|
||||
[self.altitudeImagesData removeAllObjects];
|
||||
self.altitudeElevation = nil;
|
||||
auto router = self.router;
|
||||
dispatch_async(router.renderAltitudeImagesQueue, ^{
|
||||
[router.altitudeImagesData removeAllObjects];
|
||||
router.altitudeElevation = nil;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -424,7 +472,7 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
auto const & routingManager = GetFramework().GetRoutingManager();
|
||||
if (routingManager.IsRoutingActive())
|
||||
{
|
||||
MWMTextToSpeech * tts = [MWMTextToSpeech tts];
|
||||
auto tts = [MWMTextToSpeech tts];
|
||||
if (routingManager.IsOnRoute() && tts.active)
|
||||
[tts playTurnNotifications];
|
||||
|
||||
|
@ -432,12 +480,12 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
}
|
||||
else
|
||||
{
|
||||
MWMRouterSavedState * state = [MWMRouterSavedState state];
|
||||
auto state = [MWMRouterSavedState state];
|
||||
if (state.forceStateChange == MWMRouterForceStateChange::Rebuild)
|
||||
{
|
||||
state.forceStateChange = MWMRouterForceStateChange::Start;
|
||||
self.type = routerType(GetFramework().GetRoutingManager().GetLastUsedRouter());
|
||||
[self buildToPoint:state.restorePoint bestRouter:NO];
|
||||
[MWMRouter setType:routerType(GetFramework().GetRoutingManager().GetLastUsedRouter())];
|
||||
[MWMRouter buildToPoint:state.restorePoint bestRouter:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -456,11 +504,11 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
auto & f = GetFramework();
|
||||
f.DeactivateMapSelection(true);
|
||||
if (state.forceStateChange == MWMRouterForceStateChange::Start)
|
||||
[self start];
|
||||
[MWMRouter start];
|
||||
else
|
||||
[mapViewControlsManager onRouteReady];
|
||||
[self updateFollowingInfo];
|
||||
if (![[self class] isTaxi])
|
||||
if (![MWMRouter isTaxi])
|
||||
[[MWMNavigationDashboardManager manager] setRouteBuilderProgress:100];
|
||||
|
||||
mapViewControlsManager.searchHidden = YES;
|
||||
|
@ -491,7 +539,7 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
|
||||
- (void)processRouteBuilderProgress:(CGFloat)progress
|
||||
{
|
||||
if (![[self class] isTaxi])
|
||||
if (![MWMRouter isTaxi])
|
||||
[[MWMNavigationDashboardManager manager] setRouteBuilderProgress:progress];
|
||||
}
|
||||
|
||||
|
@ -515,14 +563,14 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
code:code
|
||||
cancelBlock:^{
|
||||
if (code != routing::IRouter::NeedMoreMaps)
|
||||
[[[self class] router] stop];
|
||||
[MWMRouter stop];
|
||||
}
|
||||
downloadBlock:^(storage::TCountriesVec const & downloadCountries, MWMVoidBlock onSuccess) {
|
||||
[MWMStorage downloadNodes:downloadCountries
|
||||
onSuccess:onSuccess];
|
||||
}
|
||||
downloadCompleteBlock:^{
|
||||
[[[self class] router] rebuildWithBestRouter:NO];
|
||||
[MWMRouter rebuildWithBestRouter:NO];
|
||||
}];
|
||||
}
|
||||
else
|
||||
|
@ -531,24 +579,4 @@ m2::PointD getMercator(MWMRoutePoint * p)
|
|||
}
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (void)setStartPoint:(MWMRoutePoint *)startPoint
|
||||
{
|
||||
if (_startPoint == startPoint)
|
||||
return;
|
||||
_startPoint = startPoint;
|
||||
if (startPoint == self.finishPoint)
|
||||
self.finishPoint = zeroRoutePoint();
|
||||
}
|
||||
|
||||
- (void)setFinishPoint:(MWMRoutePoint *)finishPoint
|
||||
{
|
||||
if (_finishPoint == finishPoint)
|
||||
return;
|
||||
_finishPoint = finishPoint;
|
||||
if (finishPoint == self.startPoint)
|
||||
self.startPoint = zeroRoutePoint();
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#import "MWMRouterSavedState.h"
|
||||
#import "MWMRoutePoint.h"
|
||||
#import "MWMRoutePoint+CPP.h"
|
||||
#import "MWMRouter.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
@ -37,7 +37,7 @@ static NSString * const kETAKey = @"eta";
|
|||
if (endPointData && eta)
|
||||
{
|
||||
[endPointData getBytes:&point length:size];
|
||||
_restorePoint = routePoint(point, @"Destination");
|
||||
_restorePoint = [[MWMRoutePoint alloc] initWithPoint:point type:MWMRoutePointTypeFinish];
|
||||
if ([eta compare:[NSDate date]] == NSOrderedDescending)
|
||||
_forceStateChange = MWMRouterForceStateChange::Rebuild;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ static NSString * const kETAKey = @"eta";
|
|||
+ (void)store
|
||||
{
|
||||
Framework & f = GetFramework();
|
||||
if (!f.GetRoutingManager().IsOnRoute())
|
||||
if (![MWMRouter isOnRoute])
|
||||
return;
|
||||
location::FollowingInfo routeInfo;
|
||||
f.GetRoutingManager().GetRouteFollowingInfo(routeInfo);
|
||||
|
@ -75,7 +75,7 @@ static NSString * const kETAKey = @"eta";
|
|||
|
||||
+ (void)restore
|
||||
{
|
||||
if (GetFramework().GetRoutingManager().IsRoutingActive())
|
||||
if ([MWMRouter isRoutingActive])
|
||||
return;
|
||||
if ([MWMRouterSavedState state].forceStateChange == MWMRouterForceStateChange::None)
|
||||
[self remove];
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
import CoreLocation
|
||||
|
||||
@objc(MWMRoutePoint)
|
||||
final class RoutePoint: NSObject {
|
||||
|
||||
let point: MercatorCoordinate2D
|
||||
let name: String
|
||||
let isMyPosition: Bool
|
||||
var isValid: Bool { return self != RoutePoint() }
|
||||
var x: MercatorCoordinate { return point.x }
|
||||
var y: MercatorCoordinate { return point.y }
|
||||
|
||||
init(point: MercatorCoordinate2D, name: String, isMyPosition: Bool = false) {
|
||||
self.point = point
|
||||
self.name = name
|
||||
self.isMyPosition = isMyPosition
|
||||
super.init()
|
||||
}
|
||||
convenience init(x: MercatorCoordinate, y: MercatorCoordinate, name: String, isMyPosition: Bool = false) {
|
||||
self.init(point: MercatorCoordinate2D(x: x, y: y), name: name, isMyPosition: isMyPosition)
|
||||
}
|
||||
|
||||
convenience init(point: MercatorCoordinate2D) {
|
||||
self.init(point: point, name: L("p2p_your_location"), isMyPosition: true)
|
||||
}
|
||||
convenience init(x: MercatorCoordinate, y: MercatorCoordinate) {
|
||||
self.init(point: MercatorCoordinate2D(x: x, y: y))
|
||||
}
|
||||
|
||||
convenience override init() {
|
||||
self.init(point: MercatorCoordinate2D(), name: "", isMyPosition: false)
|
||||
}
|
||||
|
||||
override func isEqual(_ other: Any?) -> Bool {
|
||||
guard let other = other as? RoutePoint else { return false }
|
||||
return self == other
|
||||
}
|
||||
}
|
||||
|
||||
func == (lhs: RoutePoint, rhs: RoutePoint) -> Bool {
|
||||
return lhs.isMyPosition == rhs.isMyPosition &&
|
||||
lhs.point == rhs.point &&
|
||||
lhs.name == rhs.name
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
#import "MWMCommon.h"
|
||||
#import "MWMStorage.h"
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMRouter.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
|
@ -50,13 +51,13 @@ using namespace storage;
|
|||
|
||||
+ (void)deleteNode:(TCountryId const &)countryId
|
||||
{
|
||||
auto & f = GetFramework();
|
||||
if (f.GetRoutingManager().IsRoutingActive())
|
||||
if ([MWMRouter isRoutingActive])
|
||||
{
|
||||
[[MWMAlertViewController activeAlertController] presentDeleteMapProhibitedAlert];
|
||||
return;
|
||||
}
|
||||
|
||||
auto & f = GetFramework();
|
||||
if (f.HasUnsavedEdits(countryId))
|
||||
{
|
||||
[[MWMAlertViewController activeAlertController]
|
||||
|
|
|
@ -331,10 +331,6 @@
|
|||
349B92701DF0526D007779DD /* MWMToast.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349B926F1DF0526D007779DD /* MWMToast.xib */; };
|
||||
349B92711DF0526D007779DD /* MWMToast.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349B926F1DF0526D007779DD /* MWMToast.xib */; };
|
||||
349B92721DF0526D007779DD /* MWMToast.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349B926F1DF0526D007779DD /* MWMToast.xib */; };
|
||||
349C3AEC1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349C3AEB1D33A933002AC7A9 /* MWMNavigationInfoView.mm */; };
|
||||
349C3AED1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349C3AEB1D33A933002AC7A9 /* MWMNavigationInfoView.mm */; };
|
||||
349C3AEF1D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349C3AEE1D33A96B002AC7A9 /* MWMNavigationInfoView.xib */; };
|
||||
349C3AF01D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349C3AEE1D33A96B002AC7A9 /* MWMNavigationInfoView.xib */; };
|
||||
349D1AB71E2CB6E0004A2006 /* VisibleArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349D1AB61E2CB6E0004A2006 /* VisibleArea.swift */; };
|
||||
349D1AB81E2CB6E0004A2006 /* VisibleArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349D1AB61E2CB6E0004A2006 /* VisibleArea.swift */; };
|
||||
349D1AB91E2CB6E0004A2006 /* VisibleArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349D1AB61E2CB6E0004A2006 /* VisibleArea.swift */; };
|
||||
|
@ -381,6 +377,21 @@
|
|||
34AC8FBA1EFBAD1900E7F910 /* ViatorElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FB91EFBAD1900E7F910 /* ViatorElement.swift */; };
|
||||
34AC8FBB1EFBAD1900E7F910 /* ViatorElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FB91EFBAD1900E7F910 /* ViatorElement.swift */; };
|
||||
34AC8FBC1EFBAD1900E7F910 /* ViatorElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FB91EFBAD1900E7F910 /* ViatorElement.swift */; };
|
||||
34AC8FC91EFC01F500E7F910 /* MWMRoutePoint.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FC71EFC01F500E7F910 /* MWMRoutePoint.mm */; };
|
||||
34AC8FCE1EFC028600E7F910 /* MWMNavigationInfoView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FCB1EFC028600E7F910 /* MWMNavigationInfoView.mm */; };
|
||||
34AC8FCF1EFC028600E7F910 /* MWMNavigationInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34AC8FCC1EFC028600E7F910 /* MWMNavigationInfoView.xib */; };
|
||||
34AC8FD01EFC028600E7F910 /* NavigationAddPointToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FCD1EFC028600E7F910 /* NavigationAddPointToastView.swift */; };
|
||||
34AC8FD11EFC02C000E7F910 /* MWMRoutePoint.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FC71EFC01F500E7F910 /* MWMRoutePoint.mm */; };
|
||||
34AC8FD21EFC02C100E7F910 /* MWMRoutePoint.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FC71EFC01F500E7F910 /* MWMRoutePoint.mm */; };
|
||||
34AC8FD31EFC02CC00E7F910 /* MWMNavigationInfoView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FCB1EFC028600E7F910 /* MWMNavigationInfoView.mm */; };
|
||||
34AC8FD41EFC02CC00E7F910 /* MWMNavigationInfoView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FCB1EFC028600E7F910 /* MWMNavigationInfoView.mm */; };
|
||||
34AC8FD51EFC02D100E7F910 /* MWMNavigationInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34AC8FCC1EFC028600E7F910 /* MWMNavigationInfoView.xib */; };
|
||||
34AC8FD61EFC02D100E7F910 /* MWMNavigationInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34AC8FCC1EFC028600E7F910 /* MWMNavigationInfoView.xib */; };
|
||||
34AC8FD71EFC02D400E7F910 /* NavigationAddPointToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FCD1EFC028600E7F910 /* NavigationAddPointToastView.swift */; };
|
||||
34AC8FD81EFC02D500E7F910 /* NavigationAddPointToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FCD1EFC028600E7F910 /* NavigationAddPointToastView.swift */; };
|
||||
34AC8FDA1EFC062400E7F910 /* UILabel+NumberOfVisibleLines.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FD91EFC062400E7F910 /* UILabel+NumberOfVisibleLines.swift */; };
|
||||
34AC8FDB1EFC07FE00E7F910 /* UILabel+NumberOfVisibleLines.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FD91EFC062400E7F910 /* UILabel+NumberOfVisibleLines.swift */; };
|
||||
34AC8FDC1EFC07FE00E7F910 /* UILabel+NumberOfVisibleLines.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AC8FD91EFC062400E7F910 /* UILabel+NumberOfVisibleLines.swift */; };
|
||||
34B924421DC8A29C0008D971 /* MWMMailViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B924411DC8A29C0008D971 /* MWMMailViewController.mm */; };
|
||||
34B924431DC8A29C0008D971 /* MWMMailViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B924411DC8A29C0008D971 /* MWMMailViewController.mm */; };
|
||||
34BC72241B0DECAE0012A34B /* MWMMapViewControlsManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BC72111B0DECAE0012A34B /* MWMMapViewControlsManager.mm */; };
|
||||
|
@ -479,9 +490,6 @@
|
|||
34D808861E793F91002F0584 /* Pushwoosh.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D808851E793F91002F0584 /* Pushwoosh.framework */; };
|
||||
34D808871E793FA3002F0584 /* Pushwoosh.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D808851E793F91002F0584 /* Pushwoosh.framework */; };
|
||||
34D808881E793FA4002F0584 /* Pushwoosh.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D808851E793F91002F0584 /* Pushwoosh.framework */; };
|
||||
34ED298A1E3BB9B40054D003 /* RoutePoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34ED29891E3BB9B40054D003 /* RoutePoint.swift */; };
|
||||
34ED298B1E3BB9B40054D003 /* RoutePoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34ED29891E3BB9B40054D003 /* RoutePoint.swift */; };
|
||||
34ED298C1E3BB9B40054D003 /* RoutePoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34ED29891E3BB9B40054D003 /* RoutePoint.swift */; };
|
||||
34EE259D1EFA682D00F870AB /* PPViatorCarouselCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34EE259C1EFA682D00F870AB /* PPViatorCarouselCell.swift */; };
|
||||
34EE259E1EFA682D00F870AB /* PPViatorCarouselCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34EE259C1EFA682D00F870AB /* PPViatorCarouselCell.swift */; };
|
||||
34EE259F1EFA682D00F870AB /* PPViatorCarouselCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34EE259C1EFA682D00F870AB /* PPViatorCarouselCell.swift */; };
|
||||
|
@ -526,9 +534,6 @@
|
|||
34F5E0D31E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F5E0D21E3F254800B1C415 /* UIView+Hierarchy.swift */; };
|
||||
34F5E0D41E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F5E0D21E3F254800B1C415 /* UIView+Hierarchy.swift */; };
|
||||
34F5E0D51E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F5E0D21E3F254800B1C415 /* UIView+Hierarchy.swift */; };
|
||||
34F5E0D71E3F334700B1C415 /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F5E0D61E3F334700B1C415 /* Types.swift */; };
|
||||
34F5E0D81E3F334700B1C415 /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F5E0D61E3F334700B1C415 /* Types.swift */; };
|
||||
34F5E0D91E3F334700B1C415 /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F5E0D61E3F334700B1C415 /* Types.swift */; };
|
||||
34F73F9B1E082FF800AC1FD6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34F73F5F1E082FF700AC1FD6 /* InfoPlist.strings */; };
|
||||
34F73F9C1E082FF800AC1FD6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34F73F5F1E082FF700AC1FD6 /* InfoPlist.strings */; };
|
||||
34F73F9D1E082FF800AC1FD6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34F73F5F1E082FF700AC1FD6 /* InfoPlist.strings */; };
|
||||
|
@ -757,7 +762,6 @@
|
|||
849CF63F1DE842290024A8A5 /* resources-6plus_dark in Resources */ = {isa = PBXBuildFile; fileRef = 4A7D89C11B2EBF3B00AC843E /* resources-6plus_dark */; };
|
||||
849CF6401DE842290024A8A5 /* WorldCoasts.mwm in Resources */ = {isa = PBXBuildFile; fileRef = FA459EB314327AF700B5BB3C /* WorldCoasts.mwm */; };
|
||||
849CF6411DE842290024A8A5 /* packed_polygons.bin in Resources */ = {isa = PBXBuildFile; fileRef = FA85F632145DDDC20090E1A0 /* packed_polygons.bin */; };
|
||||
849CF6431DE842290024A8A5 /* MWMNavigationInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349C3AEE1D33A96B002AC7A9 /* MWMNavigationInfoView.xib */; };
|
||||
849CF6441DE842290024A8A5 /* AddSetTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D15BA71BD8F93C00C8BCBE /* AddSetTableViewCell.xib */; };
|
||||
849CF6471DE842290024A8A5 /* MWMSideButtonsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3490D2DD1CE9DD2500D0B838 /* MWMSideButtonsView.xib */; };
|
||||
849CF64A1DE842290024A8A5 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 6B9978341C89A316003B8AA0 /* editor.config */; };
|
||||
|
@ -823,7 +827,6 @@
|
|||
849CF7071DE842290024A8A5 /* LocaleTranslator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6381BF41CD12045004CA943 /* LocaleTranslator.mm */; };
|
||||
849CF70A1DE842290024A8A5 /* MWMTaxiPreviewDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = F68FCB841DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm */; };
|
||||
849CF70D1DE842290024A8A5 /* MWMAddPlaceNavigationBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */; };
|
||||
849CF70F1DE842290024A8A5 /* MWMNavigationInfoView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349C3AEB1D33A933002AC7A9 /* MWMNavigationInfoView.mm */; };
|
||||
849CF7121DE842290024A8A5 /* SelectSetVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA054611155C465E001F4E37 /* SelectSetVC.mm */; };
|
||||
849CF7141DE842290024A8A5 /* AddSetVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAA614B7155F16950031C345 /* AddSetVC.mm */; };
|
||||
849CF7151DE842290024A8A5 /* MWMInputEmailValidator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */; };
|
||||
|
@ -1368,12 +1371,6 @@
|
|||
F6E2FF081E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD141E097B9F0083EBEC /* MWMSearchHistoryManager.mm */; };
|
||||
F6E2FF091E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD141E097B9F0083EBEC /* MWMSearchHistoryManager.mm */; };
|
||||
F6E2FF0A1E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD141E097B9F0083EBEC /* MWMSearchHistoryManager.mm */; };
|
||||
F6E2FF0B1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD161E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.mm */; };
|
||||
F6E2FF0C1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD161E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.mm */; };
|
||||
F6E2FF0D1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD161E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.mm */; };
|
||||
F6E2FF0E1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD171E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.xib */; };
|
||||
F6E2FF0F1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD171E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.xib */; };
|
||||
F6E2FF101E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD171E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.xib */; };
|
||||
F6E2FF111E097BA00083EBEC /* MWMSearchHistoryRequestCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD191E097B9F0083EBEC /* MWMSearchHistoryRequestCell.mm */; };
|
||||
F6E2FF121E097BA00083EBEC /* MWMSearchHistoryRequestCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD191E097B9F0083EBEC /* MWMSearchHistoryRequestCell.mm */; };
|
||||
F6E2FF131E097BA00083EBEC /* MWMSearchHistoryRequestCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD191E097B9F0083EBEC /* MWMSearchHistoryRequestCell.mm */; };
|
||||
|
@ -1786,9 +1783,6 @@
|
|||
349B926A1DF0518E007779DD /* MWMToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMToast.h; sourceTree = "<group>"; };
|
||||
349B926B1DF0518E007779DD /* MWMToast.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMToast.mm; sourceTree = "<group>"; };
|
||||
349B926F1DF0526D007779DD /* MWMToast.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMToast.xib; sourceTree = "<group>"; };
|
||||
349C3AEA1D33A933002AC7A9 /* MWMNavigationInfoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNavigationInfoView.h; sourceTree = "<group>"; };
|
||||
349C3AEB1D33A933002AC7A9 /* MWMNavigationInfoView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNavigationInfoView.mm; sourceTree = "<group>"; };
|
||||
349C3AEE1D33A96B002AC7A9 /* MWMNavigationInfoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMNavigationInfoView.xib; sourceTree = "<group>"; };
|
||||
349C3AF11D33C6EE002AC7A9 /* MWMNavigationDashboardInfoProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMNavigationDashboardInfoProtocol.h; sourceTree = "<group>"; };
|
||||
349D1AB61E2CB6E0004A2006 /* VisibleArea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VisibleArea.swift; sourceTree = "<group>"; };
|
||||
349D1ABA1E2D05EF004A2006 /* SearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = "<group>"; };
|
||||
|
@ -1819,6 +1813,13 @@
|
|||
34ABA62E1C2D58F300FE1BEC /* MWMInputEmailValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMInputEmailValidator.h; sourceTree = "<group>"; };
|
||||
34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMInputEmailValidator.mm; sourceTree = "<group>"; };
|
||||
34AC8FB91EFBAD1900E7F910 /* ViatorElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViatorElement.swift; sourceTree = "<group>"; };
|
||||
34AC8FC71EFC01F500E7F910 /* MWMRoutePoint.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMRoutePoint.mm; sourceTree = "<group>"; };
|
||||
34AC8FC81EFC01F500E7F910 /* MWMRoutePoint+CPP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MWMRoutePoint+CPP.h"; sourceTree = "<group>"; };
|
||||
34AC8FCA1EFC028600E7F910 /* MWMNavigationInfoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNavigationInfoView.h; sourceTree = "<group>"; };
|
||||
34AC8FCB1EFC028600E7F910 /* MWMNavigationInfoView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNavigationInfoView.mm; sourceTree = "<group>"; };
|
||||
34AC8FCC1EFC028600E7F910 /* MWMNavigationInfoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMNavigationInfoView.xib; sourceTree = "<group>"; };
|
||||
34AC8FCD1EFC028600E7F910 /* NavigationAddPointToastView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationAddPointToastView.swift; sourceTree = "<group>"; };
|
||||
34AC8FD91EFC062400E7F910 /* UILabel+NumberOfVisibleLines.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UILabel+NumberOfVisibleLines.swift"; sourceTree = "<group>"; };
|
||||
34B924401DC8A29C0008D971 /* MWMMailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMailViewController.h; sourceTree = "<group>"; };
|
||||
34B924411DC8A29C0008D971 /* MWMMailViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMailViewController.mm; sourceTree = "<group>"; };
|
||||
34BC72101B0DECAE0012A34B /* MWMMapViewControlsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapViewControlsManager.h; sourceTree = "<group>"; };
|
||||
|
@ -1872,7 +1873,6 @@
|
|||
34D8087A1E793606002F0584 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
|
||||
34D8087C1E79360D002F0584 /* AlamofireImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AlamofireImage.framework; path = Carthage/Build/iOS/AlamofireImage.framework; sourceTree = "<group>"; };
|
||||
34D808851E793F91002F0584 /* Pushwoosh.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Pushwoosh.framework; path = Carthage/Build/iOS/Pushwoosh.framework; sourceTree = "<group>"; };
|
||||
34ED29891E3BB9B40054D003 /* RoutePoint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoutePoint.swift; sourceTree = "<group>"; };
|
||||
34EE259C1EFA682D00F870AB /* PPViatorCarouselCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PPViatorCarouselCell.swift; sourceTree = "<group>"; };
|
||||
34EE25A01EFA68BC00F870AB /* PPViatorCarouselCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PPViatorCarouselCell.xib; sourceTree = "<group>"; };
|
||||
34EE25A41EFA6AD400F870AB /* ViatorElement.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViatorElement.xib; sourceTree = "<group>"; };
|
||||
|
@ -1891,7 +1891,6 @@
|
|||
34F407581E9E1D7A00E57AC0 /* Mopub.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Mopub.xcodeproj; path = MoPubSDK/Mopub.xcodeproj; sourceTree = "<group>"; };
|
||||
34F4098A1E9E221700E57AC0 /* FBAudienceNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBAudienceNetwork.framework; path = MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework; sourceTree = "<group>"; };
|
||||
34F5E0D21E3F254800B1C415 /* UIView+Hierarchy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Hierarchy.swift"; sourceTree = "<group>"; };
|
||||
34F5E0D61E3F334700B1C415 /* Types.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Types.swift; sourceTree = "<group>"; };
|
||||
34F5E0DA1E3F3ED300B1C415 /* MWMRoutePoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMRoutePoint.h; sourceTree = "<group>"; };
|
||||
34F5E0DC1E3F51AF00B1C415 /* MWMCoreRouterType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMCoreRouterType.h; sourceTree = "<group>"; };
|
||||
34F73F601E082FF700AC1FD6 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
|
@ -2350,9 +2349,6 @@
|
|||
F6E2FD121E097B9F0083EBEC /* MWMSearchHistoryClearCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchHistoryClearCell.xib; sourceTree = "<group>"; };
|
||||
F6E2FD131E097B9F0083EBEC /* MWMSearchHistoryManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchHistoryManager.h; sourceTree = "<group>"; };
|
||||
F6E2FD141E097B9F0083EBEC /* MWMSearchHistoryManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchHistoryManager.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FD151E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchHistoryMyPositionCell.h; sourceTree = "<group>"; };
|
||||
F6E2FD161E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchHistoryMyPositionCell.mm; sourceTree = "<group>"; };
|
||||
F6E2FD171E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchHistoryMyPositionCell.xib; sourceTree = "<group>"; };
|
||||
F6E2FD181E097B9F0083EBEC /* MWMSearchHistoryRequestCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchHistoryRequestCell.h; sourceTree = "<group>"; };
|
||||
F6E2FD191E097B9F0083EBEC /* MWMSearchHistoryRequestCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchHistoryRequestCell.mm; sourceTree = "<group>"; };
|
||||
F6E2FD1A1E097B9F0083EBEC /* MWMSearchHistoryRequestCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchHistoryRequestCell.xib; sourceTree = "<group>"; };
|
||||
|
@ -2750,7 +2746,6 @@
|
|||
3404751C1E081A4600C92850 /* MWMMacros.h */,
|
||||
3404751D1E081A4600C92850 /* MWMTypes.h */,
|
||||
3404751E1E081A4600C92850 /* Statistics */,
|
||||
34F5E0D61E3F334700B1C415 /* Types.swift */,
|
||||
340475261E081A4600C92850 /* WebViewController.h */,
|
||||
340475271E081A4600C92850 /* WebViewController.mm */,
|
||||
3427AF0B1E49E3A500D466DB /* MWMConsts.h */,
|
||||
|
@ -2826,13 +2821,14 @@
|
|||
340475331E081A4600C92850 /* Routing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
34AC8FC71EFC01F500E7F910 /* MWMRoutePoint.mm */,
|
||||
34AC8FC81EFC01F500E7F910 /* MWMRoutePoint+CPP.h */,
|
||||
34F5E0DC1E3F51AF00B1C415 /* MWMCoreRouterType.h */,
|
||||
34F5E0DA1E3F3ED300B1C415 /* MWMRoutePoint.h */,
|
||||
340475351E081A4600C92850 /* MWMRouter.h */,
|
||||
340475361E081A4600C92850 /* MWMRouter.mm */,
|
||||
340475371E081A4600C92850 /* MWMRouterSavedState.h */,
|
||||
340475381E081A4600C92850 /* MWMRouterSavedState.mm */,
|
||||
34ED29891E3BB9B40054D003 /* RoutePoint.swift */,
|
||||
);
|
||||
path = Routing;
|
||||
sourceTree = "<group>";
|
||||
|
@ -2944,6 +2940,7 @@
|
|||
3454D7AB1E07F045004AF2AD /* UIImageView+Coloring.mm */,
|
||||
3454D7AC1E07F045004AF2AD /* UIKitCategories.h */,
|
||||
3454D7AD1E07F045004AF2AD /* UIKitCategories.mm */,
|
||||
34AC8FD91EFC062400E7F910 /* UILabel+NumberOfVisibleLines.swift */,
|
||||
3454D7AE1E07F045004AF2AD /* UILabel+RuntimeAttributes.h */,
|
||||
3454D7AF1E07F045004AF2AD /* UILabel+RuntimeAttributes.mm */,
|
||||
34D3AFE81E378AF1004100F9 /* UINib+Init.swift */,
|
||||
|
@ -3153,9 +3150,6 @@
|
|||
3497A9371B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm */,
|
||||
560634EF1B787EBE00F3D670 /* Sound */,
|
||||
34D783C71B5F9D7800E0C0EE /* Views */,
|
||||
349C3AEA1D33A933002AC7A9 /* MWMNavigationInfoView.h */,
|
||||
349C3AEB1D33A933002AC7A9 /* MWMNavigationInfoView.mm */,
|
||||
349C3AEE1D33A96B002AC7A9 /* MWMNavigationInfoView.xib */,
|
||||
349C3AF11D33C6EE002AC7A9 /* MWMNavigationDashboardInfoProtocol.h */,
|
||||
);
|
||||
name = NavigationDashboard;
|
||||
|
@ -3306,6 +3300,10 @@
|
|||
34D783C71B5F9D7800E0C0EE /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
34AC8FCA1EFC028600E7F910 /* MWMNavigationInfoView.h */,
|
||||
34AC8FCB1EFC028600E7F910 /* MWMNavigationInfoView.mm */,
|
||||
34AC8FCC1EFC028600E7F910 /* MWMNavigationInfoView.xib */,
|
||||
34AC8FCD1EFC028600E7F910 /* NavigationAddPointToastView.swift */,
|
||||
348320CC1B6A2C52007EC039 /* MWMNavigationViewProtocol.h */,
|
||||
F6BD33821B6240F200F2CE18 /* MWMNavigationView.h */,
|
||||
F6BD33831B6240F200F2CE18 /* MWMNavigationView.mm */,
|
||||
|
@ -4145,9 +4143,6 @@
|
|||
F6E2FD121E097B9F0083EBEC /* MWMSearchHistoryClearCell.xib */,
|
||||
F6E2FD131E097B9F0083EBEC /* MWMSearchHistoryManager.h */,
|
||||
F6E2FD141E097B9F0083EBEC /* MWMSearchHistoryManager.mm */,
|
||||
F6E2FD151E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.h */,
|
||||
F6E2FD161E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.mm */,
|
||||
F6E2FD171E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.xib */,
|
||||
F6E2FD181E097B9F0083EBEC /* MWMSearchHistoryRequestCell.h */,
|
||||
F6E2FD191E097B9F0083EBEC /* MWMSearchHistoryRequestCell.mm */,
|
||||
F6E2FD1A1E097B9F0083EBEC /* MWMSearchHistoryRequestCell.xib */,
|
||||
|
@ -4562,6 +4557,7 @@
|
|||
F64F4B6F1B46A5380081A24A /* MWMDownloaderDialogCell.xib in Resources */,
|
||||
F64F4B711B4A41D40081A24A /* MWMDownloaderDialogHeader.xib in Resources */,
|
||||
F64F19A41AB81A00006EAF7E /* MWMDownloadTransitMapAlert.xib in Resources */,
|
||||
34AC8FCF1EFC028600E7F910 /* MWMNavigationInfoView.xib in Resources */,
|
||||
F652B2EA1C6DE8E500D20C8C /* MWMDropDown.xib in Resources */,
|
||||
34D3B0231E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */,
|
||||
34D3B0261E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.xib in Resources */,
|
||||
|
@ -4587,7 +4583,6 @@
|
|||
F6E2FD6D1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */,
|
||||
F6E2FD731E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */,
|
||||
349A13841DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */,
|
||||
349C3AEF1D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */,
|
||||
34D3B04A1E389D05004100F9 /* MWMNoteCell.xib in Resources */,
|
||||
F6E2FDEE1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
|
||||
F6E2FDF41E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */,
|
||||
|
@ -4618,7 +4613,6 @@
|
|||
F6E2FF321E097BA00083EBEC /* MWMSearchCommonCell.xib in Resources */,
|
||||
BB7626B51E8559980031D71C /* icudt57l.dat in Resources */,
|
||||
F6E2FF051E097BA00083EBEC /* MWMSearchHistoryClearCell.xib in Resources */,
|
||||
F6E2FF0E1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.xib in Resources */,
|
||||
F6E2FF141E097BA00083EBEC /* MWMSearchHistoryRequestCell.xib in Resources */,
|
||||
F6E2FEE71E097BA00083EBEC /* MWMSearchNoResults.xib in Resources */,
|
||||
346225911DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib in Resources */,
|
||||
|
@ -4734,6 +4728,7 @@
|
|||
6741A9511BF340DE002C974C /* MWMDownloaderDialogHeader.xib in Resources */,
|
||||
6741A96C1BF340DE002C974C /* MWMDownloadTransitMapAlert.xib in Resources */,
|
||||
F653CE0E1C6DEB2E00A453F1 /* MWMDropDown.xib in Resources */,
|
||||
34AC8FD51EFC02D100E7F910 /* MWMNavigationInfoView.xib in Resources */,
|
||||
34D3B0241E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */,
|
||||
34D3B0271E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.xib in Resources */,
|
||||
F6E2FDB91E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */,
|
||||
|
@ -4757,7 +4752,6 @@
|
|||
F6E2FD6E1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */,
|
||||
F6E2FD741E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */,
|
||||
349A13851DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */,
|
||||
349C3AF01D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */,
|
||||
34D3B04B1E389D05004100F9 /* MWMNoteCell.xib in Resources */,
|
||||
F6E2FDEF1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
|
||||
F6E2FDF51E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */,
|
||||
|
@ -4787,7 +4781,6 @@
|
|||
F6E2FF331E097BA00083EBEC /* MWMSearchCommonCell.xib in Resources */,
|
||||
F6E2FF061E097BA00083EBEC /* MWMSearchHistoryClearCell.xib in Resources */,
|
||||
3488B0161E9D0AEC0068AFD8 /* AdBanner.xib in Resources */,
|
||||
F6E2FF0F1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.xib in Resources */,
|
||||
BB7626B61E85599C0031D71C /* icudt57l.dat in Resources */,
|
||||
F6E2FF151E097BA00083EBEC /* MWMSearchHistoryRequestCell.xib in Resources */,
|
||||
F6E2FEE81E097BA00083EBEC /* MWMSearchNoResults.xib in Resources */,
|
||||
|
@ -4906,6 +4899,7 @@
|
|||
849CF6011DE842290024A8A5 /* MWMDownloaderDialogHeader.xib in Resources */,
|
||||
849CF62F1DE842290024A8A5 /* MWMDownloadTransitMapAlert.xib in Resources */,
|
||||
849CF61B1DE842290024A8A5 /* MWMDropDown.xib in Resources */,
|
||||
34AC8FD61EFC02D100E7F910 /* MWMNavigationInfoView.xib in Resources */,
|
||||
34D3B0251E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */,
|
||||
34D3B0281E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.xib in Resources */,
|
||||
F6E2FDBA1E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */,
|
||||
|
@ -4929,7 +4923,6 @@
|
|||
F6E2FD691E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */,
|
||||
F6E2FD6F1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */,
|
||||
F6E2FD751E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */,
|
||||
849CF6431DE842290024A8A5 /* MWMNavigationInfoView.xib in Resources */,
|
||||
34D3B04C1E389D05004100F9 /* MWMNoteCell.xib in Resources */,
|
||||
F6E2FDF01E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
|
||||
F6E2FDF61E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */,
|
||||
|
@ -4962,7 +4955,6 @@
|
|||
F6E2FF071E097BA00083EBEC /* MWMSearchHistoryClearCell.xib in Resources */,
|
||||
BB7626B71E85599C0031D71C /* icudt57l.dat in Resources */,
|
||||
341B10761E55B15B00071C74 /* MWMMobileInternetAlert.xib in Resources */,
|
||||
F6E2FF101E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.xib in Resources */,
|
||||
F6E2FF161E097BA00083EBEC /* MWMSearchHistoryRequestCell.xib in Resources */,
|
||||
F6E2FEE91E097BA00083EBEC /* MWMSearchNoResults.xib in Resources */,
|
||||
849CF5E71DE842290024A8A5 /* MWMSearchNoResultsAlert.xib in Resources */,
|
||||
|
@ -5141,7 +5133,6 @@
|
|||
1D60589B0D05DD56006BFB54 /* main.mm in Sources */,
|
||||
34D3B04E1E38A20C004100F9 /* Bundle+Init.swift in Sources */,
|
||||
340837161B72451A00B5C185 /* MWMShareActivityItem.mm in Sources */,
|
||||
F6E2FF0B1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */,
|
||||
F6E2FF531E097BA00083EBEC /* MWMHelpController.mm in Sources */,
|
||||
F6E2FF591E097BA00083EBEC /* MWMNightModeController.mm in Sources */,
|
||||
3454D7B81E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */,
|
||||
|
@ -5216,6 +5207,7 @@
|
|||
F64D9C9F1C899C350063FA30 /* MWMEditorViralAlert.mm in Sources */,
|
||||
34ABA62C1C2D57D500FE1BEC /* MWMInputPasswordValidator.mm in Sources */,
|
||||
34845DAE1E1649F6003D55B9 /* DownloaderNoResultsEmbedViewController.swift in Sources */,
|
||||
34AC8FC91EFC01F500E7F910 /* MWMRoutePoint.mm in Sources */,
|
||||
34ABA6161C2D185C00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm in Sources */,
|
||||
F6E2FEDE1E097BA00083EBEC /* MWMSearchManager+Layout.mm in Sources */,
|
||||
3454D7D31E07F045004AF2AD /* UIImageView+Coloring.mm in Sources */,
|
||||
|
@ -5274,6 +5266,7 @@
|
|||
F6E2FD551E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */,
|
||||
349A357C1B53D4C9009677EE /* MWMCircularProgressView.mm in Sources */,
|
||||
3465E7D81B6658C000854C4D /* MWMAPIBar.mm in Sources */,
|
||||
34AC8FDA1EFC062400E7F910 /* UILabel+NumberOfVisibleLines.swift in Sources */,
|
||||
F6E2FD971E097BA00083EBEC /* MWMBookmarkTitleCell.m in Sources */,
|
||||
342CC5F11C2D7730005F3FE5 /* MWMAuthorizationLoginViewController.mm in Sources */,
|
||||
349D1ADD1E2E325C004A2006 /* MWMBottomMenuViewController.mm in Sources */,
|
||||
|
@ -5313,7 +5306,6 @@
|
|||
F653CE161C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */,
|
||||
F6E2FE991E097BA00083EBEC /* MWMiPadPlacePageLayoutImpl.mm in Sources */,
|
||||
34D3B03B1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm in Sources */,
|
||||
349C3AEC1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */,
|
||||
3454D7CD1E07F045004AF2AD /* UIFont+MapsMeFonts.mm in Sources */,
|
||||
3454D7DC1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */,
|
||||
F682249A1E5B104600BC1C18 /* PPHotelDescriptionCell.swift in Sources */,
|
||||
|
@ -5324,6 +5316,7 @@
|
|||
F6E2FD6A1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.mm in Sources */,
|
||||
FAA614B8155F16950031C345 /* AddSetVC.mm in Sources */,
|
||||
F6E2FF681E097BA00083EBEC /* MWMUnitsController.mm in Sources */,
|
||||
34AC8FCE1EFC028600E7F910 /* MWMNavigationInfoView.mm in Sources */,
|
||||
34ABA6301C2D58F300FE1BEC /* MWMInputEmailValidator.mm in Sources */,
|
||||
F6E2FE9C1E097BA00083EBEC /* MWMiPhonePlacePageLayoutImpl.mm in Sources */,
|
||||
3454D7C71E07F045004AF2AD /* UIButton+RuntimeAttributes.mm in Sources */,
|
||||
|
@ -5342,7 +5335,6 @@
|
|||
F6E2FF4D1E097BA00083EBEC /* MWMAboutController.mm in Sources */,
|
||||
34F5E0D31E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */,
|
||||
34F407371E9E1AFF00E57AC0 /* FacebookBanner.swift in Sources */,
|
||||
34ED298A1E3BB9B40054D003 /* RoutePoint.swift in Sources */,
|
||||
3497A93A1B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm in Sources */,
|
||||
F6E2FED81E097BA00083EBEC /* MWMSearchContentView.mm in Sources */,
|
||||
F6E2FD881E097BA00083EBEC /* MWMMapDownloaderViewController.mm in Sources */,
|
||||
|
@ -5412,8 +5404,8 @@
|
|||
F6E2FF171E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.mm in Sources */,
|
||||
F64F199B1AB81A00006EAF7E /* MWMAlert.mm in Sources */,
|
||||
3488B0191E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */,
|
||||
34AC8FD01EFC028600E7F910 /* NavigationAddPointToastView.swift in Sources */,
|
||||
ED48BBB517C267F5003E7E92 /* ColorPickerView.mm in Sources */,
|
||||
34F5E0D71E3F334700B1C415 /* Types.swift in Sources */,
|
||||
F6E2FF561E097BA00083EBEC /* MWMMobileInternetViewController.mm in Sources */,
|
||||
340416431E7BED3900E2B6D6 /* PhotosTransitionAnimator.swift in Sources */,
|
||||
ED48BBBA17C2B1E2003E7E92 /* CircleView.mm in Sources */,
|
||||
|
@ -5440,7 +5432,6 @@
|
|||
6741A9A31BF340DE002C974C /* main.mm in Sources */,
|
||||
34D3B04F1E38A20C004100F9 /* Bundle+Init.swift in Sources */,
|
||||
F67E751E1DB76DFC00D6741F /* MWMTaxiCollectionLayout.mm in Sources */,
|
||||
F6E2FF0C1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */,
|
||||
F6E2FF541E097BA00083EBEC /* MWMHelpController.mm in Sources */,
|
||||
F6E2FF5A1E097BA00083EBEC /* MWMNightModeController.mm in Sources */,
|
||||
6741A9A51BF340DE002C974C /* MWMShareActivityItem.mm in Sources */,
|
||||
|
@ -5515,6 +5506,7 @@
|
|||
F6791B141C43DF0B007A8A6E /* MWMStartButton.mm in Sources */,
|
||||
F6E2FEDF1E097BA00083EBEC /* MWMSearchManager+Layout.mm in Sources */,
|
||||
F64D9CA01C899C350063FA30 /* MWMEditorViralAlert.mm in Sources */,
|
||||
34AC8FD11EFC02C000E7F910 /* MWMRoutePoint.mm in Sources */,
|
||||
6741A9CF1BF340DE002C974C /* MWMLocationAlert.mm in Sources */,
|
||||
34ABA62D1C2D57D500FE1BEC /* MWMInputPasswordValidator.mm in Sources */,
|
||||
F6E2FDA11E097BA00083EBEC /* MWMEditorAdditionalNamesTableViewController.mm in Sources */,
|
||||
|
@ -5573,6 +5565,7 @@
|
|||
F6E2FD561E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */,
|
||||
3462258F1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm in Sources */,
|
||||
6741A9E71BF340DE002C974C /* MWMCircularProgressView.mm in Sources */,
|
||||
34AC8FDB1EFC07FE00E7F910 /* UILabel+NumberOfVisibleLines.swift in Sources */,
|
||||
F6E2FD981E097BA00083EBEC /* MWMBookmarkTitleCell.m in Sources */,
|
||||
6741A9E81BF340DE002C974C /* MWMAPIBar.mm in Sources */,
|
||||
349A13831DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */,
|
||||
|
@ -5615,7 +5608,6 @@
|
|||
34D3B03C1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm in Sources */,
|
||||
6741A9FF1BF340DE002C974C /* AddSetVC.mm in Sources */,
|
||||
3454D7CE1E07F045004AF2AD /* UIFont+MapsMeFonts.mm in Sources */,
|
||||
349C3AED1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */,
|
||||
F682249B1E5B104600BC1C18 /* PPHotelDescriptionCell.swift in Sources */,
|
||||
F6E2FECA1E097BA00083EBEC /* MWMSearchFilterTransitioning.mm in Sources */,
|
||||
3454D7DD1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */,
|
||||
|
@ -5623,6 +5615,7 @@
|
|||
F6E2FE821E097BA00083EBEC /* MWMPlacePageOpeningHoursDayView.mm in Sources */,
|
||||
F6E2FD6B1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.mm in Sources */,
|
||||
6741AA021BF340DE002C974C /* BookmarksRootVC.mm in Sources */,
|
||||
34AC8FD31EFC02CC00E7F910 /* MWMNavigationInfoView.mm in Sources */,
|
||||
F6E2FF691E097BA00083EBEC /* MWMUnitsController.mm in Sources */,
|
||||
6741AA031BF340DE002C974C /* MWMActivityViewController.mm in Sources */,
|
||||
F6E2FE9D1E097BA00083EBEC /* MWMiPhonePlacePageLayoutImpl.mm in Sources */,
|
||||
|
@ -5642,7 +5635,6 @@
|
|||
F6E2FF4E1E097BA00083EBEC /* MWMAboutController.mm in Sources */,
|
||||
34F407381E9E1AFF00E57AC0 /* FacebookBanner.swift in Sources */,
|
||||
34F5E0D41E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */,
|
||||
34ED298B1E3BB9B40054D003 /* RoutePoint.swift in Sources */,
|
||||
6741AA0B1BF340DE002C974C /* MWMMapViewControlsManager.mm in Sources */,
|
||||
F6E2FED91E097BA00083EBEC /* MWMSearchContentView.mm in Sources */,
|
||||
F6E2FD891E097BA00083EBEC /* MWMMapDownloaderViewController.mm in Sources */,
|
||||
|
@ -5711,9 +5703,9 @@
|
|||
3454D7D71E07F045004AF2AD /* UIKitCategories.mm in Sources */,
|
||||
34AB39C21D2BD8310021857D /* MWMStopButton.mm in Sources */,
|
||||
3488B01A1E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */,
|
||||
34AC8FD71EFC02D400E7F910 /* NavigationAddPointToastView.swift in Sources */,
|
||||
6741AA281BF340DE002C974C /* MWMAlert.mm in Sources */,
|
||||
F6E2FF571E097BA00083EBEC /* MWMMobileInternetViewController.mm in Sources */,
|
||||
34F5E0D81E3F334700B1C415 /* Types.swift in Sources */,
|
||||
340416441E7BED3900E2B6D6 /* PhotosTransitionAnimator.swift in Sources */,
|
||||
6741AA291BF340DE002C974C /* ColorPickerView.mm in Sources */,
|
||||
6741AA2B1BF340DE002C974C /* CircleView.mm in Sources */,
|
||||
|
@ -5739,7 +5731,6 @@
|
|||
849CF6821DE842290024A8A5 /* main.mm in Sources */,
|
||||
34D3B0501E38A20C004100F9 /* Bundle+Init.swift in Sources */,
|
||||
3454D7D51E07F045004AF2AD /* UIImageView+Coloring.mm in Sources */,
|
||||
F6E2FF0D1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */,
|
||||
F6E2FF551E097BA00083EBEC /* MWMHelpController.mm in Sources */,
|
||||
F6E2FF5B1E097BA00083EBEC /* MWMNightModeController.mm in Sources */,
|
||||
849CF6841DE842290024A8A5 /* MWMShareActivityItem.mm in Sources */,
|
||||
|
@ -5814,6 +5805,7 @@
|
|||
849CF6C31DE842290024A8A5 /* MWMEditorViralAlert.mm in Sources */,
|
||||
34845DB01E1649F6003D55B9 /* DownloaderNoResultsEmbedViewController.swift in Sources */,
|
||||
3454D7E11E07F045004AF2AD /* UITextField+RuntimeAttributes.mm in Sources */,
|
||||
34AC8FD21EFC02C100E7F910 /* MWMRoutePoint.mm in Sources */,
|
||||
F6E2FEE01E097BA00083EBEC /* MWMSearchManager+Layout.mm in Sources */,
|
||||
849CF6C61DE842290024A8A5 /* MWMInputPasswordValidator.mm in Sources */,
|
||||
849CF6C71DE842290024A8A5 /* MWMAuthorizationOSMLoginViewController.mm in Sources */,
|
||||
|
@ -5872,6 +5864,7 @@
|
|||
F6E2FD571E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */,
|
||||
340475751E081A4600C92850 /* MWMStorage.mm in Sources */,
|
||||
849CF6E11DE842290024A8A5 /* MWMDownloaderDialogHeader.mm in Sources */,
|
||||
34AC8FDC1EFC07FE00E7F910 /* UILabel+NumberOfVisibleLines.swift in Sources */,
|
||||
F6E2FD991E097BA00083EBEC /* MWMBookmarkTitleCell.m in Sources */,
|
||||
340475511E081A4600C92850 /* fabric_logging_ios.mm in Sources */,
|
||||
349D1ADF1E2E325C004A2006 /* MWMBottomMenuViewController.mm in Sources */,
|
||||
|
@ -5920,8 +5913,8 @@
|
|||
F6E2FE831E097BA00083EBEC /* MWMPlacePageOpeningHoursDayView.mm in Sources */,
|
||||
340416591E7C0D4100E2B6D6 /* PhotosOverlayView.swift in Sources */,
|
||||
F6E2FD6C1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.mm in Sources */,
|
||||
849CF70F1DE842290024A8A5 /* MWMNavigationInfoView.mm in Sources */,
|
||||
F6E2FF6A1E097BA00083EBEC /* MWMUnitsController.mm in Sources */,
|
||||
34AC8FD41EFC02CC00E7F910 /* MWMNavigationInfoView.mm in Sources */,
|
||||
3454D7BA1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */,
|
||||
F6E2FE9E1E097BA00083EBEC /* MWMiPhonePlacePageLayoutImpl.mm in Sources */,
|
||||
340475721E081A4600C92850 /* MWMSettings.mm in Sources */,
|
||||
|
@ -5940,7 +5933,6 @@
|
|||
F6E2FF4F1E097BA00083EBEC /* MWMAboutController.mm in Sources */,
|
||||
34F5E0D51E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */,
|
||||
34F407391E9E1AFF00E57AC0 /* FacebookBanner.swift in Sources */,
|
||||
34ED298C1E3BB9B40054D003 /* RoutePoint.swift in Sources */,
|
||||
849CF71D1DE842290024A8A5 /* MWMNavigationDashboardManager.mm in Sources */,
|
||||
3454D7C91E07F045004AF2AD /* UIButton+RuntimeAttributes.mm in Sources */,
|
||||
F6E2FEDA1E097BA00083EBEC /* MWMSearchContentView.mm in Sources */,
|
||||
|
@ -6010,8 +6002,8 @@
|
|||
F6E2FF191E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.mm in Sources */,
|
||||
3404754E1E081A4600C92850 /* MWMKeyboard.mm in Sources */,
|
||||
3488B01B1E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */,
|
||||
34AC8FD81EFC02D500E7F910 /* NavigationAddPointToastView.swift in Sources */,
|
||||
849CF7631DE842290024A8A5 /* MWMAlert.mm in Sources */,
|
||||
34F5E0D91E3F334700B1C415 /* Types.swift in Sources */,
|
||||
F6E2FF581E097BA00083EBEC /* MWMMobileInternetViewController.mm in Sources */,
|
||||
340416451E7BED3900E2B6D6 /* PhotosTransitionAnimator.swift in Sources */,
|
||||
849CF7651DE842290024A8A5 /* ColorPickerView.mm in Sources */,
|
||||
|
|
|
@ -10,7 +10,7 @@ final class ThemeManager: NSObject {
|
|||
|
||||
private func update(theme: MWMTheme) {
|
||||
let actualTheme: MWMTheme = { theme in
|
||||
let isVehicleRouting = MWMRouter.isRoutingActive() && (MWMRouter().type == .vehicle)
|
||||
let isVehicleRouting = MWMRouter.isRoutingActive() && (MWMRouter.type() == .vehicle)
|
||||
switch theme {
|
||||
case .day: fallthrough
|
||||
case .vehicleDay: return isVehicleRouting ? .vehicleDay : .day
|
||||
|
|
|
@ -3,7 +3,6 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuState) {
|
|||
MWMBottomMenuStateInactive,
|
||||
MWMBottomMenuStateActive,
|
||||
MWMBottomMenuStateCompact,
|
||||
MWMBottomMenuStatePlanning,
|
||||
MWMBottomMenuStateGo,
|
||||
MWMBottomMenuStateRoutingError,
|
||||
MWMBottomMenuStateRouting,
|
||||
|
|
|
@ -173,6 +173,8 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
|
||||
- (void)noftifyBottomBoundChange
|
||||
{
|
||||
if (self.state == MWMBottomMenuStateHidden)
|
||||
return;
|
||||
CGFloat const height = self.superview.height - self.mainButtonsHeight.constant;
|
||||
[MWMMapWidgets widgetsManager].bottomBound = height;
|
||||
[MWMSideButtons buttons].bottomBound = height;
|
||||
|
@ -216,7 +218,6 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
self.routingView.alpha = 0.0;
|
||||
self.routingAdditionalView.alpha = 0.0;
|
||||
break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
case MWMBottomMenuStateGo:
|
||||
self.backgroundColor = [UIColor white];
|
||||
self.menuButton.alpha = 0.0;
|
||||
|
@ -291,11 +292,11 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
if (self.heightProfileContainer.hidden || ![MWMRouter hasRouteAltitude])
|
||||
return;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[[MWMRouter router] routeAltitudeImageForSize:self.heightProfileImage.frame.size
|
||||
completion:^(UIImage * image, NSString * altitudeElevation) {
|
||||
self.heightProfileImage.image = image;
|
||||
self.elevationHeight.text = altitudeElevation;
|
||||
}];
|
||||
[MWMRouter routeAltitudeImageForSize:self.heightProfileImage.frame.size
|
||||
completion:^(UIImage * image, NSString * altitudeElevation) {
|
||||
self.heightProfileImage.image = image;
|
||||
self.elevationHeight.text = altitudeElevation;
|
||||
}];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -328,7 +329,6 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
self.routingAdditionalView.hidden = YES;
|
||||
self.taxiContainer.hidden = YES;
|
||||
break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
case MWMBottomMenuStateGo:
|
||||
{
|
||||
self.downloadBadge.hidden = YES;
|
||||
|
@ -340,7 +340,7 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
BOOL const isNeedToShowTaxi = [MWMRouter isTaxi];
|
||||
self.estimateLabel.hidden = isNeedToShowTaxi;
|
||||
self.taxiContainer.hidden = !isNeedToShowTaxi || IPAD;
|
||||
self.estimateLabel.hidden = self.state == MWMBottomMenuStatePlanning;
|
||||
self.estimateLabel.hidden = NO;
|
||||
break;
|
||||
}
|
||||
case MWMBottomMenuStateRoutingError:
|
||||
|
@ -378,14 +378,10 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
{
|
||||
case MWMBottomMenuStateHidden: self.minY = self.superview.height; return;
|
||||
case MWMBottomMenuStateInactive: break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
[self layoutPlanningGeometry];
|
||||
self.mainButtonsHeight.constant = 0.0;
|
||||
break;
|
||||
case MWMBottomMenuStateGo:
|
||||
{
|
||||
[[MWMNavigationDashboardManager manager] updateStartButtonTitle:self.goButton];
|
||||
[self layoutPlanningGeometry];
|
||||
[self layoutGoGeometry];
|
||||
if ([MWMRouter hasRouteAltitude])
|
||||
{
|
||||
BOOL const isLandscape = self.width > self.layoutThreshold;
|
||||
|
@ -446,7 +442,7 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
self.frame = {{self.superview.width - width, self.superview.height - height}, {width, height}};
|
||||
}
|
||||
|
||||
- (void)layoutPlanningGeometry
|
||||
- (void)layoutGoGeometry
|
||||
{
|
||||
BOOL const isLandscape = self.width > self.layoutThreshold;
|
||||
self.estimateLabelTopOffset.priority = UILayoutPriorityDefaultLow;
|
||||
|
@ -564,7 +560,6 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
{
|
||||
case MWMBottomMenuStateHidden:
|
||||
case MWMBottomMenuStateInactive:
|
||||
case MWMBottomMenuStatePlanning:
|
||||
case MWMBottomMenuStateRoutingError:
|
||||
case MWMBottomMenuStateGo: name = @"ic_menu"; break;
|
||||
case MWMBottomMenuStateActive:
|
||||
|
@ -610,8 +605,9 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
|
||||
- (void)updateBadge
|
||||
{
|
||||
if (self.state == MWMBottomMenuStateRouting || self.state == MWMBottomMenuStateRoutingExpanded ||
|
||||
self.state == MWMBottomMenuStatePlanning || self.state == MWMBottomMenuStateGo)
|
||||
auto state = self.state;
|
||||
if (state == MWMBottomMenuStateRouting || state == MWMBottomMenuStateRoutingExpanded ||
|
||||
state == MWMBottomMenuStateGo)
|
||||
{
|
||||
self.downloadBadge.hidden = YES;
|
||||
return;
|
||||
|
@ -642,7 +638,7 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
case MWMBottomMenuStateHidden: updateMenuButton = NO; break;
|
||||
case MWMBottomMenuStateInactive:
|
||||
{
|
||||
if (MapsAppDelegate.theApp.routingPlaneMode == MWMRoutingPlaneModeNone)
|
||||
if (![MWMRouter isRoutingActive])
|
||||
_leftBound = 0.0;
|
||||
self.p2pButton.hidden = self.searchButton.hidden = self.bookmarksButton.hidden = NO;
|
||||
self.menuButton.hidden = NO;
|
||||
|
@ -665,20 +661,6 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
self.layoutDuration = IPAD ? kDefaultAnimationDuration : 0.0;
|
||||
self.menuButton.hidden = NO;
|
||||
break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
self.goButton.enabled = NO;
|
||||
self.goButton.hidden = NO;
|
||||
self.estimateLabel.hidden = YES;
|
||||
self.heightProfileContainer.hidden = YES;
|
||||
self.heightProfileElevation.hidden = YES;
|
||||
self.toggleInfoButton.hidden = YES;
|
||||
self.speedView.hidden = YES;
|
||||
self.timeView.hidden = YES;
|
||||
self.distanceView.hidden = YES;
|
||||
self.progressView.hidden = YES;
|
||||
self.routingView.hidden = NO;
|
||||
self.routingAdditionalView.hidden = YES;
|
||||
break;
|
||||
case MWMBottomMenuStateGo:
|
||||
{
|
||||
self.goButton.enabled = YES;
|
||||
|
|
|
@ -287,11 +287,9 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
|
|||
|
||||
- (void)ttsButtonStatusChanged:(NSNotification *)notification
|
||||
{
|
||||
auto const & f = GetFramework();
|
||||
if (!f.GetRoutingManager().IsRoutingActive())
|
||||
if (![MWMRouter isRoutingActive])
|
||||
return;
|
||||
BOOL const isPedestrianRouting =
|
||||
f.GetRoutingManager().GetRouter() == routing::RouterType::Pedestrian;
|
||||
BOOL const isPedestrianRouting = [MWMRouter type] == MWMRouterTypePedestrian;
|
||||
MWMButton * ttsButton = self.ttsSoundButton;
|
||||
ttsButton.hidden = isPedestrianRouting || ![MWMTextToSpeech isTTSEnabled];
|
||||
if (!ttsButton.hidden)
|
||||
|
@ -429,18 +427,10 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
|
|||
self.state = self.restoreState;
|
||||
BOOL const isSelected = !sender.isSelected;
|
||||
sender.selected = isSelected;
|
||||
MapsAppDelegate * theApp = [MapsAppDelegate theApp];
|
||||
if (isSelected)
|
||||
{
|
||||
[[MWMMapViewControlsManager manager] onRoutePrepare];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (theApp.routingPlaneMode == MWMRoutingPlaneModeSearchDestination ||
|
||||
theApp.routingPlaneMode == MWMRoutingPlaneModeSearchSource)
|
||||
self.controller.controlsManager.searchHidden = YES;
|
||||
[MWMRouter stopRouting];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)searchButtonTouchUpInside
|
||||
|
@ -466,7 +456,6 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
|
|||
{
|
||||
case MWMBottomMenuStateHidden: NSAssert(false, @"Incorrect state"); break;
|
||||
case MWMBottomMenuStateInactive:
|
||||
case MWMBottomMenuStatePlanning:
|
||||
case MWMBottomMenuStateGo:
|
||||
case MWMBottomMenuStateRoutingError:
|
||||
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatExpand}];
|
||||
|
@ -572,11 +561,10 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
|
|||
view.state = self.restoreState = state;
|
||||
return;
|
||||
}
|
||||
if (IPAD && (state == MWMBottomMenuStatePlanning || state == MWMBottomMenuStateGo))
|
||||
if (IPAD && state == MWMBottomMenuStateGo)
|
||||
return;
|
||||
if (view.state == MWMBottomMenuStateCompact &&
|
||||
(state == MWMBottomMenuStatePlanning || state == MWMBottomMenuStateGo ||
|
||||
state == MWMBottomMenuStateRouting))
|
||||
(state == MWMBottomMenuStateGo || state == MWMBottomMenuStateRouting))
|
||||
self.restoreState = state;
|
||||
else
|
||||
view.state = state;
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
#import "MWMEditBookmarkController.h"
|
||||
#import "MWMFrameworkListener.h"
|
||||
#import "MWMFrameworkObservers.h"
|
||||
#import "MWMLocationManager.h"
|
||||
#import "MWMLocationHelpers.h"
|
||||
#import "MWMLocationManager.h"
|
||||
#import "MWMLocationObserver.h"
|
||||
#import "MWMPlacePageData.h"
|
||||
#import "MWMPlacePageLayout.h"
|
||||
#import "MWMRoutePoint.h"
|
||||
#import "MWMRoutePoint+CPP.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MWMSideButtons.h"
|
||||
#import "MWMStorage.h"
|
||||
|
@ -262,7 +262,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatBuildRoute)
|
||||
withParameters:@{kStatValue : kStatSource}];
|
||||
[[MWMRouter router] buildFromPoint:self.target bestRouter:YES];
|
||||
[MWMRouter buildFromPoint:[self routePointWithType:MWMRoutePointTypeStart] bestRouter:YES];
|
||||
[self close];
|
||||
}
|
||||
|
||||
|
@ -270,30 +270,29 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatBuildRoute)
|
||||
withParameters:@{kStatValue : kStatDestination}];
|
||||
[[MWMRouter router] buildToPoint:self.target bestRouter:YES];
|
||||
[MWMRouter buildToPoint:[self routePointWithType:MWMRoutePointTypeFinish] bestRouter:YES];
|
||||
[self close];
|
||||
}
|
||||
|
||||
- (void)addStop
|
||||
{
|
||||
[[MWMRouter router] addIntermediatePointAndRebuild:self.target
|
||||
intermediateIndex:0];
|
||||
[MWMRouter addIntermediatePointAndRebuild:[self routePointWithType:MWMRoutePointTypeIntermediate]
|
||||
intermediateIndex:0];
|
||||
[self shouldClose];
|
||||
}
|
||||
|
||||
- (void)removeStop
|
||||
{
|
||||
auto router = [MWMRouter router];
|
||||
switch (self.data.routeMarkType)
|
||||
{
|
||||
case RouteMarkType::Start:
|
||||
[router removeStartPointAndRebuild:self.data.intermediateIndex];
|
||||
[MWMRouter removeStartPointAndRebuild:self.data.intermediateIndex];
|
||||
break;
|
||||
case RouteMarkType::Finish:
|
||||
[router removeFinishPointAndRebuild:self.data.intermediateIndex];
|
||||
[MWMRouter removeFinishPointAndRebuild:self.data.intermediateIndex];
|
||||
break;
|
||||
case RouteMarkType::Intermediate:
|
||||
[router removeIntermediatePointAndRebuild:self.data.intermediateIndex];
|
||||
[MWMRouter removeIntermediatePointAndRebuild:self.data.intermediateIndex];
|
||||
break;
|
||||
}
|
||||
[self shouldClose];
|
||||
|
@ -306,17 +305,20 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
return;
|
||||
[Statistics logEvent:kStatPlacePageTaxiClick
|
||||
withParameters:@{kStatProvider : kStatUber, kStatTags : data.statisticsTags}];
|
||||
auto router = [MWMRouter router];
|
||||
router.type = MWMRouterTypeTaxi;
|
||||
[router buildToPoint:self.target bestRouter:NO];
|
||||
[MWMRouter setType:MWMRouterTypeTaxi];
|
||||
[MWMRouter buildToPoint:[self routePointWithType:MWMRoutePointTypeFinish] bestRouter:NO];
|
||||
[self close];
|
||||
}
|
||||
|
||||
- (MWMRoutePoint *)target
|
||||
- (MWMRoutePoint *)routePointWithType:(MWMRoutePointType)type
|
||||
{
|
||||
auto data = self.data;
|
||||
if (!data)
|
||||
return zeroRoutePoint();
|
||||
return nil;
|
||||
|
||||
if (data.isMyPosition)
|
||||
return [[MWMRoutePoint alloc] initWithLastLocationAndType:type];
|
||||
|
||||
NSString * name = nil;
|
||||
if (data.title.length > 0)
|
||||
name = data.title;
|
||||
|
@ -329,8 +331,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
else
|
||||
name = L(@"placepage_unknown_place");
|
||||
|
||||
m2::PointD const & org = data.mercator;
|
||||
return data.isMyPosition ? routePoint(org) : routePoint(org, name);
|
||||
return [[MWMRoutePoint alloc] initWithPoint:data.mercator type:type];
|
||||
}
|
||||
|
||||
- (void)share
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
- (void)setDownloadingState:(MWMCircularProgressState)state;
|
||||
|
||||
- (UIView *)shareAnchor;
|
||||
- (BOOL)isPrepareRouteMode;
|
||||
|
||||
- (instancetype)init __attribute__((unavailable("call actionBarForPlacePage: instead")));
|
||||
- (instancetype)initWithCoder:(NSCoder *)aDecoder __attribute__((unavailable("call actionBarForPlacePage: instead")));
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#import "MWMPlacePageActionBar.h"
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMActionBarButton.h"
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMPlacePageProtocol.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MapViewController.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
|
||||
|
@ -19,7 +20,6 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
|
||||
@property(copy, nonatomic) IBOutletCollection(UIView) NSArray<UIView *> * buttons;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView * separator;
|
||||
@property(nonatomic) BOOL isPrepareRouteMode;
|
||||
|
||||
@property(weak, nonatomic) id<MWMActionBarSharedData> data;
|
||||
@property(weak, nonatomic) id<MWMActionBarProtocol> delegate;
|
||||
|
@ -39,7 +39,6 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
- (void)configureWithData:(id<MWMActionBarSharedData>)data
|
||||
{
|
||||
self.data = data;
|
||||
self.isPrepareRouteMode = MapsAppDelegate.theApp.routingPlaneMode != MWMRoutingPlaneModeNone;
|
||||
self.isBookmark = data.isBookmark;
|
||||
[self configureButtons];
|
||||
self.autoresizingMask = UIViewAutoresizingNone;
|
||||
|
@ -61,10 +60,10 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
BOOL const isSponsored = isBooking || isOpentable || isBookingSearch;
|
||||
BOOL const itHasPhoneNumber = isIphone && isPhoneNotEmpty;
|
||||
BOOL const isApi = data.isApi;
|
||||
BOOL const isP2P = self.isPrepareRouteMode;
|
||||
BOOL const isP2P = [MWMRouter isRoutingActive];
|
||||
BOOL const isMyPosition = data.isMyPosition;
|
||||
BOOL const isRoutePoint = data.isRoutePoint;
|
||||
BOOL const isNeedToAddIntermediatePoint = GetFramework().GetRoutingManager().CouldAddIntermediatePoint();
|
||||
BOOL const isNeedToAddIntermediatePoint = [MWMRouter canAddIntermediatePoint];
|
||||
|
||||
EButton sponsoredButton = EButton::BookingSearch;
|
||||
if (isBooking)
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#import "MWMLocationManager.h"
|
||||
#import "MWMMapViewControlsManager.h"
|
||||
#import "MWMNoMapsViewController.h"
|
||||
#import "MWMRoutePoint.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MWMSearch.h"
|
||||
#import "MWMSearchChangeModeView.h"
|
||||
|
@ -22,8 +21,6 @@
|
|||
|
||||
#import "3party/Alohalytics/src/alohalytics_objc.h"
|
||||
|
||||
#include "MWMRoutePoint.h"
|
||||
|
||||
#include "storage/storage_helpers.hpp"
|
||||
|
||||
#include "Framework.h"
|
||||
|
@ -152,10 +149,6 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerActionBarState) {
|
|||
[Statistics logEvent:kStatEventName(kStatSearch, kStatCancel)];
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"searchCancel"];
|
||||
self.state = MWMSearchManagerStateHidden;
|
||||
MapsAppDelegate * a = MapsAppDelegate.theApp;
|
||||
MWMRoutingPlaneMode const m = a.routingPlaneMode;
|
||||
if (m == MWMRoutingPlaneModeSearchDestination || m == MWMRoutingPlaneModeSearchSource)
|
||||
a.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
}
|
||||
|
||||
- (void)tabButtonPressed:(MWMSearchTabButtonsView *)sender
|
||||
|
@ -196,42 +189,10 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerActionBarState) {
|
|||
[MWMSearch searchQuery:text forInputLocale:inputLocale];
|
||||
}
|
||||
|
||||
- (void)tapMyPositionFromHistory
|
||||
{
|
||||
MapsAppDelegate * a = MapsAppDelegate.theApp;
|
||||
auto p = routePoint([MWMLocationManager lastLocation].mercator);
|
||||
if (a.routingPlaneMode == MWMRoutingPlaneModeSearchSource)
|
||||
[[MWMRouter router] buildFromPoint:p bestRouter:YES];
|
||||
else if (a.routingPlaneMode == MWMRoutingPlaneModeSearchDestination)
|
||||
[[MWMRouter router] buildToPoint:p bestRouter:YES];
|
||||
else
|
||||
NSAssert(false, @"Incorrect state for process my position tap");
|
||||
if (!IPAD)
|
||||
a.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
self.state = MWMSearchManagerStateHidden;
|
||||
}
|
||||
|
||||
- (void)dismissKeyboard { [self.searchTextField resignFirstResponder]; }
|
||||
- (void)processSearchWithResult:(search::Result const &)result
|
||||
{
|
||||
MapsAppDelegate * a = MapsAppDelegate.theApp;
|
||||
MWMRoutingPlaneMode const m = a.routingPlaneMode;
|
||||
if (m == MWMRoutingPlaneModeSearchSource)
|
||||
{
|
||||
auto p = routePoint(result.GetFeatureCenter(), @(result.GetString().c_str()));
|
||||
[[MWMRouter router] buildFromPoint:p bestRouter:YES];
|
||||
}
|
||||
else if (m == MWMRoutingPlaneModeSearchDestination)
|
||||
{
|
||||
auto p = routePoint(result.GetFeatureCenter(), @(result.GetString().c_str()));
|
||||
[[MWMRouter router] buildToPoint:p bestRouter:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
[MWMSearch showResult:result];
|
||||
}
|
||||
if (!IPAD && a.routingPlaneMode != MWMRoutingPlaneModeNone)
|
||||
a.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
[MWMSearch showResult:result];
|
||||
self.state = MWMSearchManagerStateHidden;
|
||||
}
|
||||
|
||||
|
@ -319,14 +280,15 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerActionBarState) {
|
|||
[self animateConstraints:^{
|
||||
self.actionBarViewBottom.priority = UILayoutPriorityDefaultHigh;
|
||||
}];
|
||||
[self viewHidden:[MWMRouter isRoutingActive]];
|
||||
auto const navigationManagerState = [MWMNavigationDashboardManager manager].state;
|
||||
[self viewHidden:navigationManagerState != MWMNavigationDashboardStateHidden];
|
||||
[MWMSearch setSearchOnMap:YES];
|
||||
[self.tableViewController reloadData];
|
||||
|
||||
GetFramework().DeactivateMapSelection(true);
|
||||
[self.searchTextField resignFirstResponder];
|
||||
|
||||
if ([MWMNavigationDashboardManager manager].state == MWMNavigationDashboardStateNavigation)
|
||||
if (navigationManagerState == MWMNavigationDashboardStateNavigation)
|
||||
{
|
||||
self.searchTextField.text = @"";
|
||||
[self.tabbedController resetSelectedTab];
|
||||
|
|
|
@ -6,6 +6,5 @@
|
|||
@property (weak, nonatomic) id<MWMSearchTabbedViewProtocol> delegate;
|
||||
|
||||
- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell;
|
||||
- (BOOL)isRouteSearchMode;
|
||||
|
||||
@end
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#import "MWMCommon.h"
|
||||
#import "MWMLocationManager.h"
|
||||
#import "MWMSearchHistoryClearCell.h"
|
||||
#import "MWMSearchHistoryMyPositionCell.h"
|
||||
#import "MWMSearchHistoryRequestCell.h"
|
||||
#import "MWMSearchNoResults.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
|
@ -21,14 +20,6 @@
|
|||
|
||||
@implementation MWMSearchHistoryManager
|
||||
|
||||
- (BOOL)isRouteSearchMode
|
||||
{
|
||||
MWMRoutingPlaneMode const m = MapsAppDelegate.theApp.routingPlaneMode;
|
||||
CLLocation * lastLocation = [MWMLocationManager lastLocation];
|
||||
return lastLocation &&
|
||||
(m == MWMRoutingPlaneModeSearchSource || m == MWMRoutingPlaneModeSearchDestination);
|
||||
}
|
||||
|
||||
- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell
|
||||
{
|
||||
self.cell = cell;
|
||||
|
@ -36,8 +27,7 @@
|
|||
tableView.estimatedRowHeight = 44.;
|
||||
tableView.rowHeight = UITableViewAutomaticDimension;
|
||||
tableView.alpha = 1.0;
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
if (GetFramework().GetLastSearchQueries().empty() && !isRouteSearch)
|
||||
if (GetFramework().GetLastSearchQueries().empty())
|
||||
{
|
||||
tableView.hidden = YES;
|
||||
[cell addNoResultsView:self.noResultsView];
|
||||
|
@ -50,7 +40,6 @@
|
|||
tableView.dataSource = self;
|
||||
[tableView registerWithCellClass:[MWMSearchHistoryRequestCell class]];
|
||||
[tableView registerWithCellClass:[MWMSearchHistoryClearCell class]];
|
||||
[tableView registerWithCellClass:[MWMSearchHistoryMyPositionCell class]];
|
||||
[tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
@ -66,15 +55,13 @@
|
|||
|
||||
- (NSString *)stringAtIndex:(NSInteger)index
|
||||
{
|
||||
NSUInteger const i = self.isRouteSearchMode ? index - 1 : index;
|
||||
return @([self queryAtIndex:i].second.c_str());
|
||||
return @([self queryAtIndex:index].second.c_str());
|
||||
}
|
||||
|
||||
- (BOOL)isRequestCell:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSUInteger const row = indexPath.row;
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
return isRouteSearch ? row > 0 : row < GetFramework().GetLastSearchQueries().size();
|
||||
return row < GetFramework().GetLastSearchQueries().size();
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource
|
||||
|
@ -95,8 +82,7 @@
|
|||
[tCell config:[self stringAtIndex:indexPath.row]];
|
||||
return tCell;
|
||||
}
|
||||
Class cls = self.isRouteSearchMode ? [MWMSearchHistoryMyPositionCell class]
|
||||
: [MWMSearchHistoryClearCell class];
|
||||
Class cls = [MWMSearchHistoryClearCell class];
|
||||
return [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath];
|
||||
}
|
||||
|
||||
|
@ -104,12 +90,10 @@
|
|||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
id<MWMSearchTabbedViewProtocol> delegate = self.delegate;
|
||||
if ([self isRequestCell:indexPath])
|
||||
{
|
||||
search::QuerySaver::TSearchRequest const & query =
|
||||
[self queryAtIndex:isRouteSearch ? indexPath.row - 1 : indexPath.row];
|
||||
search::QuerySaver::TSearchRequest const & query = [self queryAtIndex:indexPath.row];
|
||||
NSString * queryText = @(query.second.c_str());
|
||||
[Statistics logEvent:kStatEventName(kStatSearch, kStatSelectResult)
|
||||
withParameters:@{kStatValue : queryText, kStatScreen : kStatHistory}];
|
||||
|
@ -117,13 +101,6 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
if (isRouteSearch)
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatSearch, kStatSelectResult)
|
||||
withParameters:@{kStatValue : kStatMyPosition, kStatScreen : kStatHistory}];
|
||||
[delegate tapMyPositionFromHistory];
|
||||
return;
|
||||
}
|
||||
[Statistics logEvent:kStatEventName(kStatSearch, kStatSelectResult)
|
||||
withParameters:@{kStatValue : kStatClear, kStatScreen : kStatHistory}];
|
||||
GetFramework().ClearSearchHistory();
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
@interface MWMSearchHistoryMyPositionCell : MWMTableViewCell
|
||||
|
||||
@end
|
|
@ -1,15 +0,0 @@
|
|||
#import "MWMSearchHistoryMyPositionCell.h"
|
||||
|
||||
@implementation MWMSearchHistoryMyPositionCell
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
if (IPAD)
|
||||
self.contentView.backgroundColor = [UIColor white];
|
||||
CALayer * sl = self.layer;
|
||||
sl.shouldRasterize = YES;
|
||||
sl.rasterizationScale = UIScreen.mainScreen.scale;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,73 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MWMSearchHistoryMyPositionCell" id="uvh-nl-Yob" customClass="MWMSearchHistoryMyPositionCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uvh-nl-Yob" id="JF3-jd-gfD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_current_position" translatesAutoresizingMaskIntoConstraints="NO" id="hik-Fn-AeJ" userLabel="Icon">
|
||||
<rect key="frame" x="16" y="8" width="28" height="28"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="28" id="AHc-bb-adQ"/>
|
||||
<constraint firstAttribute="height" constant="28" id="da4-xG-m0E"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMBlack"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5vp-WU-ZFN" userLabel="Separator">
|
||||
<rect key="frame" x="60" y="42" width="260" height="1"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="br6-hl-Ecq"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="My position" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ruc-o5-hBy" userLabel="Clear label">
|
||||
<rect key="frame" x="60" y="12" width="244" height="20"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_your_location"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="ruc-o5-hBy" secondAttribute="trailing" constant="16" id="6Np-wk-maE"/>
|
||||
<constraint firstItem="hik-Fn-AeJ" firstAttribute="leading" secondItem="JF3-jd-gfD" secondAttribute="leading" constant="16" id="HnE-gR-icX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5vp-WU-ZFN" secondAttribute="trailing" id="QRt-IT-JVQ"/>
|
||||
<constraint firstItem="5vp-WU-ZFN" firstAttribute="leading" secondItem="hik-Fn-AeJ" secondAttribute="trailing" constant="16" id="QWm-Nu-2te"/>
|
||||
<constraint firstItem="ruc-o5-hBy" firstAttribute="top" secondItem="JF3-jd-gfD" secondAttribute="top" constant="12" id="U3l-UG-bcb"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ruc-o5-hBy" secondAttribute="bottom" constant="11" id="Vwu-mc-Qy2"/>
|
||||
<constraint firstAttribute="bottom" secondItem="5vp-WU-ZFN" secondAttribute="bottom" id="bV6-fB-tRN"/>
|
||||
<constraint firstItem="ruc-o5-hBy" firstAttribute="leading" secondItem="5vp-WU-ZFN" secondAttribute="leading" id="nI4-uc-JV4"/>
|
||||
<constraint firstAttribute="centerY" secondItem="hik-Fn-AeJ" secondAttribute="centerY" id="wP9-mz-caJ"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_current_position" width="28" height="28"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -63,7 +63,7 @@ BOOL isOffsetInButton(CGFloat offset, MWMSearchTabButtonsView * button)
|
|||
- (void)mwm_refreshUI { [self.view mwm_refreshUI]; }
|
||||
- (void)resetSelectedTab
|
||||
{
|
||||
if (GetFramework().GetLastSearchQueries().empty() && !self.historyManager.isRouteSearchMode)
|
||||
if (GetFramework().GetLastSearchQueries().empty())
|
||||
self.selectedButtonTag = 1;
|
||||
else
|
||||
self.selectedButtonTag =
|
||||
|
|
Loading…
Add table
Reference in a new issue