[ios] Work with circular progress.

This commit is contained in:
v.mikhaylenko 2015-10-21 11:26:14 +03:00
parent 8895fa504a
commit 6686a99069
19 changed files with 117 additions and 128 deletions

View file

@ -17,6 +17,7 @@ typedef void (^CloseAlertCompletion)();
code:(routing::IRouter::ResultCode)code;
- (void)presentRateAlert;
- (void)presentFacebookAlert;
- (void)presentPoint2PointAlertWithOkBlock:(nonnull CloseAlertCompletion)block;
- (void)presentRoutingDisclaimerAlert;
- (void)presentDisabledLocationAlert;
- (void)presentLocationAlert;

View file

@ -61,6 +61,11 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
// });
}
- (void)presentPoint2PointAlertWithOkBlock:(nonnull CloseAlertCompletion)block
{
[self displayAlert:[MWMAlert point2PointAlertWithOkBlock:block]];
}
- (void)presentFacebookAlert
{
[self displayAlert:MWMAlert.facebookAlert];

View file

@ -23,6 +23,7 @@ typedef void (^RightButtonAction)();
+ (MWMAlert *)noConnectionAlert;
+ (MWMAlert *)locationServiceNotSupportedAlert;
+ (MWMAlert *)pedestrianToastShareAlert:(BOOL)isFirstLaunch;
+ (MWMAlert *)point2PointAlertWithOkBlock:(RightButtonAction)block;
- (void)close;
- (void)setNeedsCloseAlertAfterEnterBackground;

View file

@ -26,6 +26,11 @@
return [MWMFacebookAlert alert];
}
+ (MWMAlert *)point2PointAlertWithOkBlock:(RightButtonAction)block
{
return [MWMDefaultAlert point2PointAlertWithOkBlock:block];
}
+ (MWMAlert *)routingDisclaimerAlertWithInitialOrientation:(UIInterfaceOrientation)orientation
{
return [MWMRoutingDisclaimerAlert alertWithInitialOrientation:orientation];

View file

@ -13,5 +13,6 @@
+ (instancetype)noWiFiAlertWithName:(NSString *)name downloadBlock:(RightButtonAction)block;
+ (instancetype)noConnectionAlert;
+ (instancetype)locationServiceNotSupportedAlert;
+ (instancetype)point2PointAlertWithOkBlock:(RightButtonAction)block;
@end

View file

@ -108,6 +108,13 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return [self defaultAlertWithTitle:@"routing_failed_cross_mwm_building" message:nil rightButtonTitle:@"ok" leftButtonTitle:nil rightButtonAction:nil];
}
+ (instancetype)point2PointAlertWithOkBlock:(RightButtonAction)block
{
return [self defaultAlertWithTitle:@"Navigation is available only from your current location."
message:@"Do you want us to recreate/rebuild/ plan the route?"
rightButtonTitle:@"ok" leftButtonTitle:@"cancel" rightButtonAction:block];
}
+ (instancetype)defaultAlertWithTitle:(nonnull NSString *)title message:(nullable NSString *)message rightButtonTitle:(nonnull NSString *)rightButtonTitle leftButtonTitle:(nullable NSString *)leftButtonTitle rightButtonAction:(nullable RightButtonAction)action
{
MWMDefaultAlert * alert = [[[NSBundle mainBundle] loadNibNamed:kDefaultAlertNibName owner:self options:nil] firstObject];

View file

@ -13,11 +13,12 @@
@property (nonatomic) CGFloat progress;
@property (nonatomic) BOOL failed;
@property (nonatomic) BOOL selected;
@property (weak, nonatomic) id <MWMCircularProgressDelegate> delegate;
- (void)setImage:(nullable UIImage *)image forState:(UIControlState)state;
- (nonnull instancetype)init __attribute__((unavailable("init is not available")));
- (nonnull instancetype)initWithParentView:(nonnull UIView *)parentView delegate:(nonnull id <MWMCircularProgressDelegate>)delegate;
- (nonnull instancetype)initWithParentView:(nonnull UIView *)parentView;
- (void)reset;
- (void)startSpinner;
- (void)stopSpinner;

View file

@ -5,23 +5,19 @@
@property (nonatomic) IBOutlet MWMCircularProgressView * rootView;
@property (nonatomic) IBOutlet UIButton * button;
@property (nonatomic) NSNumber * nextProgressToAnimate;
@property (weak, nonatomic) id <MWMCircularProgressDelegate> delegate;
@end
@implementation MWMCircularProgress
- (nonnull instancetype)initWithParentView:(nonnull UIView *)parentView delegate:(nonnull id <MWMCircularProgressDelegate>)delegate
- (nonnull instancetype)initWithParentView:(nonnull UIView *)parentView
{
self = [super init];
if (self)
{
[[NSBundle mainBundle] loadNibNamed:self.class.className owner:self options:nil];
[parentView addSubview:self.rootView];
self.delegate = delegate;
[self reset];
}
return self;

View file

@ -37,7 +37,8 @@
{
[[NSBundle mainBundle] loadNibNamed:self.class.className owner:self options:nil];
[parentView addSubview:self.rootView];
self.progressView = [[MWMCircularProgress alloc] initWithParentView:self.progressViewWrapper delegate:self];
self.progressView = [[MWMCircularProgress alloc] initWithParentView:self.progressViewWrapper];
self.progressView.delegate = self;
self.delegate = delegate;
[self showRequest];
}

View file

@ -6,7 +6,7 @@ typedef struct MWMRoutePoint
MWMRoutePoint(m2::PointD const & p, NSString * n) : point(p), name(n), isMyPosition(false) {};
MWMRoutePoint(m2::PointD const & p) : point(p), name(L(@"my_position")), isMyPosition(true) {};
explicit MWMRoutePoint(m2::PointD const & p) : point(p), name(L(@"my_position")), isMyPosition(true) {};
bool operator ==(MWMRoutePoint const & p) const
{

View file

@ -134,8 +134,6 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell)
- (void)setInactive
{
self.p2pButton.selected = NO;
if (IPAD)
return;
self.state = MWMBottomMenuStateInactive;
}

View file

@ -58,7 +58,7 @@ extern NSString * const kAlohalyticsTapEventKey;
self.hidden = NO;
self.zoomHidden = NO;
self.menuState = MWMBottomMenuStateInactive;
self.routeSource = {ToMercator(MapsAppDelegate.theApp.m_locationManager.lastLocation.coordinate)};
self.routeSource = MWMRoutePoint(ToMercator(MapsAppDelegate.theApp.m_locationManager.lastLocation.coordinate));
self.routeDestination = MWMRoutePoint::MWMRoutePointZero();
return self;
}
@ -315,13 +315,7 @@ extern NSString * const kAlohalyticsTapEventKey;
self.navigationManager.state = MWMNavigationDashboardStatePlanning;
[self.menuController setPlanning];
GetFramework().BuildRoute(self.routeSource.point, self.routeDestination.point, 0 /* timeoutSec */);
// This hack is needed to instantly show initial progress.
// Because user may think that nothing happens when he is building a route.
dispatch_async(dispatch_get_main_queue(), ^
{
CGFloat const initialRoutingProgress = 5.;
[self setRouteBuildingProgress:initialRoutingProgress];
});
[self.navigationManager setRouteBuildingProgress:0.];
}
- (BOOL)isPossibleToBuildRoute
@ -338,13 +332,26 @@ extern NSString * const kAlohalyticsTapEventKey;
[self.placePageManager setTopBound:topBound];
}
- (void)didStartFollowing
- (BOOL)didStartFollowing
{
if (!self.routeSource.isMyPosition)
{
MWMAlertViewController * controller = [[MWMAlertViewController alloc] initWithViewController:self.ownerController];
[controller presentPoint2PointAlertWithOkBlock:^{
m2::PointD const locationPoint = ToMercator(MapsAppDelegate.theApp.m_locationManager.lastLocation.coordinate);
self.routeSource = MWMRoutePoint(locationPoint);
[self.navigationManager.routePreview reloadData];
[self buildRoute];
}];
return NO;
}
self.hidden = NO;
self.zoomHidden = NO;
GetFramework().FollowRoute();
self.disableStandbyOnRouteFollowing = YES;
[self.menuController setStreetName:@""];
[RouteState save];
return YES;
}
- (void)didCancelRouting
@ -372,7 +379,7 @@ extern NSString * const kAlohalyticsTapEventKey;
- (void)resetRoutingPoint
{
self.routeSource = {ToMercator(MapsAppDelegate.theApp.m_locationManager.lastLocation.coordinate)};
self.routeSource = MWMRoutePoint(ToMercator(MapsAppDelegate.theApp.m_locationManager.lastLocation.coordinate));
self.routeDestination = MWMRoutePoint::MWMRoutePointZero();
}
@ -397,10 +404,10 @@ extern NSString * const kAlohalyticsTapEventKey;
- (void)routingNavigation
{
if (![self didStartFollowing])
return;
self.navigationManager.state = MWMNavigationDashboardStateNavigation;
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModeNone;
[self didStartFollowing];
[self.menuController setStreetName:@""];
}
- (void)setDisableStandbyOnRouteFollowing:(BOOL)disableStandbyOnRouteFollowing

View file

@ -19,7 +19,7 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState)
- (void)buildRoute;
- (BOOL)isPossibleToBuildRoute;
- (void)didStartFollowing;
- (BOOL)didStartFollowing;
- (void)didCancelRouting;
- (void)updateStatusBarStyle;
- (void)didStartEditingRoutePoint:(BOOL)isSource;

View file

@ -1,6 +1,7 @@
#import "Common.h"
#import "Macros.h"
#import "MapsAppDelegate.h"
#import "MWMCircularProgress.h"
#import "MWMLanesPanel.h"
#import "MWMNavigationDashboard.h"
#import "MWMNavigationDashboardEntity.h"
@ -11,7 +12,7 @@
#import "MWMTextToSpeech.h"
#import "MWMRouteTypeButton.h"
@interface MWMNavigationDashboardManager ()
@interface MWMNavigationDashboardManager () <MWMCircularProgressDelegate>
@property (nonatomic) IBOutlet MWMRoutePreview * iPhoneRoutePreview;
@property (nonatomic) IBOutlet MWMRoutePreview * iPadRoutePreview;
@ -20,7 +21,7 @@
@property (nonatomic) IBOutlet MWMNavigationDashboard * navigationDashboardLandscape;
@property (nonatomic) IBOutlet MWMNavigationDashboard * navigationDashboardPortrait;
@property (weak, nonatomic) MWMNavigationDashboard * navigationDashboard;
@property (weak, nonatomic) MWMRouteTypeButton * activeRouteTypeButton;
@property (weak, nonatomic) MWMCircularProgress * activeRouteTypeButton;
@property (weak, nonatomic) UIView * ownerView;
@ -43,7 +44,6 @@
self.ownerView = view;
_delegate = delegate;
BOOL const isPortrait = self.ownerView.width < self.ownerView.height;
if (IPAD)
{
[NSBundle.mainBundle loadNibNamed:@"MWMiPadRoutePreview" owner:self options:nil];
@ -56,6 +56,7 @@
}
self.routePreview.dashboardManager = self;
self.routePreview.pedestrianProgressView.delegate = self.routePreview.vehicleProgressView.delegate = self;
self.routePreview.delegate = delegate;
self.routePreview.dataSource = delegate;
if (IPAD)
@ -220,47 +221,46 @@
panel.hidden = YES;
}
#pragma mark - MWMRoutePreview
#pragma mark - MWMCircularProgressDelegate
- (IBAction)routePreviewChange:(MWMRouteTypeButton *)sender
- (void)progressButtonPressed:(nonnull MWMCircularProgress *)progress
{
// if (sender.selected)
// return;
// sender.selected = YES;
// self.activeRouteTypeButton = sender;
// auto & f = GetFramework();
// routing::RouterType type;
// if ([sender isEqual:self.routePreview.pedestrian])
// {
// self.routePreview.vehicle.selected = NO;
// type = routing::RouterType::Pedestrian;
// }
// else
// {
// self.routePreview.pedestrian.selected = NO;
// type = routing::RouterType::Vehicle;
// }
// f.CloseRouting();
// f.SetRouter(type);
// f.SetLastUsedRouter(type);
// if (!self.delegate.isPossibleToBuildRoute)
// return;
// [sender startAnimating];
// [self.delegate buildRoute];
}
- (void)setRouteBuildingProgress:(CGFloat)progress
{
if (progress < 6)
if (progress.selected)
return;
progress.selected = YES;
self.activeRouteTypeButton = progress;
auto & f = GetFramework();
routing::RouterType type;
if ([progress isEqual:self.routePreview.pedestrianProgressView])
{
[self.activeRouteTypeButton startAnimating];
self.routePreview.vehicleProgressView.selected = NO;
type = routing::RouterType::Pedestrian;
}
else
{
if (self.activeRouteTypeButton.isAnimating)
[self.activeRouteTypeButton stopAnimating];
[self.routePreview setRouteBuildingProgress:progress];
self.routePreview.pedestrianProgressView.selected = NO;
type = routing::RouterType::Vehicle;
}
f.CloseRouting();
f.SetRouter(type);
f.SetLastUsedRouter(type);
if (!self.delegate.isPossibleToBuildRoute)
return;
[progress startSpinner];
[self.delegate buildRoute];
}
#pragma mark - MWMRoutePreview
- (void)setRouteBuildingProgress:(CGFloat)progress
{
dispatch_async(dispatch_get_main_queue(), ^
{
if (progress < 5.)
[self.activeRouteTypeButton startSpinner];
else
[self.activeRouteTypeButton setProgress:progress / 100.];
});
}
#pragma mark - MWMNavigationDashboard
@ -280,8 +280,8 @@
- (IBAction)navigationGoPressed:(UIButton *)sender
{
self.state = MWMNavigationDashboardStateNavigation;
[self.delegate didStartFollowing];
if ([self.delegate didStartFollowing])
self.state = MWMNavigationDashboardStateNavigation;
}
#pragma mark - State changes
@ -324,19 +324,19 @@
- (void)setupActualRoute
{
// switch (GetFramework().GetRouter())
// {
// case routing::RouterType::Pedestrian:
// self.routePreview.pedestrian.selected = YES;
// self.routePreview.vehicle.selected = NO;
// self.activeRouteTypeButton = self.routePreview.pedestrian;
// break;
// case routing::RouterType::Vehicle:
// self.routePreview.vehicle.selected = YES;
// self.routePreview.pedestrian.selected = NO;
// self.activeRouteTypeButton = self.routePreview.vehicle;
// break;
// }
switch (GetFramework().GetRouter())
{
case routing::RouterType::Pedestrian:
self.routePreview.pedestrianProgressView.selected = YES;
self.routePreview.vehicleProgressView.selected = NO;
self.activeRouteTypeButton = self.routePreview.pedestrianProgressView;
break;
case routing::RouterType::Vehicle:
self.routePreview.vehicleProgressView.selected = YES;
self.routePreview.pedestrianProgressView.selected = NO;
self.activeRouteTypeButton = self.routePreview.vehicleProgressView;
break;
}
}
#pragma mark - Properties

View file

@ -11,10 +11,13 @@
@class MWMNavigationDashboardEntity;
@class MWMRouteTypeButton;
@class MWMNavigationDashboardManager;
@class MWMCircularProgress;
@interface MWMRoutePreview : MWMNavigationView
@property (weak, nonatomic, readonly) IBOutlet UIButton * extendButton;
@property (nonatomic, readonly) MWMCircularProgress * pedestrianProgressView;
@property (nonatomic, readonly) MWMCircularProgress * vehicleProgressView;
@property (weak, nonatomic) id<MWMRoutePreviewDataSource> dataSource;
@property (weak, nonatomic) MWMNavigationDashboardManager * dashboardManager;
@ -23,7 +26,6 @@
- (void)statePlanning;
- (void)stateError;
- (void)stateReady;
- (void)setRouteBuildingProgress:(CGFloat)progress;
- (void)reloadData;
@end

View file

@ -15,7 +15,7 @@ static NSDictionary * const kEtaAttributes = @{NSForegroundColorAttributeName :
static CGFloat const kBottomPanelHeight = 48.;
static CGFloat const kAdditionalHeight = 20.;
@interface MWMRoutePreview () <MWMRoutePointCellDelegate, MWMCircularProgressDelegate>
@interface MWMRoutePreview () <MWMRoutePointCellDelegate>
@property (weak, nonatomic) IBOutlet UIView * pedestrian;
@property (weak, nonatomic) IBOutlet UIView * vehicle;
@ -35,8 +35,8 @@ static CGFloat const kAdditionalHeight = 20.;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * statusBoxHeight;
@property (nonatomic) UIImageView * movingCellImage;
@property (nonatomic) MWMCircularProgress * pedestrianProgressView;
@property (nonatomic) MWMCircularProgress * vehicleProgressView;
@property (nonatomic, readwrite) MWMCircularProgress * pedestrianProgressView;
@property (nonatomic, readwrite) MWMCircularProgress * vehicleProgressView;
@end
@ -51,14 +51,14 @@ static CGFloat const kAdditionalHeight = 20.;
[self.collectionView registerNib:[UINib nibWithNibName:[MWMRoutePointCell className] bundle:nil]
forCellWithReuseIdentifier:[MWMRoutePointCell className]];
self.pedestrianProgressView = [[MWMCircularProgress alloc] initWithParentView:self.pedestrian delegate:self];
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_drive_off"] forState:UIControlStateNormal];
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_drive_press"] forState:UIControlStateHighlighted];
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_drive_on"] forState:UIControlStateSelected];
self.vehicleProgressView = [[MWMCircularProgress alloc] initWithParentView:self.vehicle delegate:self];
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_walk_off"] forState:UIControlStateNormal];
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_walk_press"] forState:UIControlStateHighlighted];
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_walk_on"] forState:UIControlStateSelected];
self.pedestrianProgressView = [[MWMCircularProgress alloc] initWithParentView:self.pedestrian];
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_off"] forState:UIControlStateNormal];
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_press"] forState:UIControlStateHighlighted];
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_on"] forState:UIControlStateSelected];
self.vehicleProgressView = [[MWMCircularProgress alloc] initWithParentView:self.vehicle];
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_off"] forState:UIControlStateNormal];
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_press"] forState:UIControlStateHighlighted];
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_on"] forState:UIControlStateSelected];
}
- (void)didMoveToSuperview
@ -187,12 +187,6 @@ static CGFloat const kAdditionalHeight = 20.;
[self.delegate routePreviewDidChangeFrame:self.frame];
}
#pragma mark - MWMCircularProgressDelegate
- (void)progressButtonPressed:(nonnull MWMCircularProgress *)progress
{
}
#pragma mark - Properties
- (CGRect)defaultFrame
@ -209,8 +203,6 @@ static CGFloat const kAdditionalHeight = 20.;
return self.planningRouteViewHeight.constant + kBottomPanelHeight + kAdditionalHeight;
}
- (void)setRouteBuildingProgress:(CGFloat)progress { }
- (IBAction)extendTap
{
BOOL const isExtended = !self.extendButton.selected;

View file

@ -191,17 +191,11 @@
<rect key="frame" x="0.0" y="0.0" width="48" height="48"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<action selector="routePreviewChange:" destination="-1" eventType="touchUpInside" id="OZw-Td-RZg"/>
</connections>
</view>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6D3-QF-6wm">
<rect key="frame" x="48" y="0.0" width="48" height="48"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<action selector="routePreviewChange:" destination="-1" eventType="touchUpInside" id="rGh-pI-yHL"/>
</connections>
</view>
</subviews>
<animations/>

View file

@ -85,31 +85,15 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sXu-tl-a0m" userLabel="Buttons Box">
<rect key="frame" x="100" y="0.0" width="120" height="48"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jDl-pu-eov" customClass="MWMRouteTypeButton">
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jDl-pu-eov">
<rect key="frame" x="0.0" y="0.0" width="48" height="48"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="icon" value="ic_drive_off"/>
<userDefinedRuntimeAttribute type="image" keyPath="highlightedIcon" value="ic_type_drive_off_press"/>
<userDefinedRuntimeAttribute type="image" keyPath="selectedIcon" value="ic_drive_on"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="routePreviewChange:" destination="-1" eventType="touchUpInside" id="855-IB-Ziq"/>
</connections>
</view>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VhE-hA-Leo" customClass="MWMRouteTypeButton">
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VhE-hA-Leo">
<rect key="frame" x="72" y="0.0" width="48" height="48"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="icon" value="ic_walk_off"/>
<userDefinedRuntimeAttribute type="image" keyPath="highlightedIcon" value="ic_type_walk_off_press"/>
<userDefinedRuntimeAttribute type="image" keyPath="selectedIcon" value="ic_walk_on"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="routePreviewChange:" destination="-1" eventType="touchUpInside" id="ul6-f7-l9I"/>
</connections>
</view>
</subviews>
<animations/>
@ -350,12 +334,6 @@
</objects>
<resources>
<image name="ic_checkmark" width="24" height="24"/>
<image name="ic_drive_off" width="40" height="40"/>
<image name="ic_drive_on" width="40" height="40"/>
<image name="ic_nav_bar_back" width="44" height="44"/>
<image name="ic_type_drive_off_press" width="40" height="40"/>
<image name="ic_type_walk_off_press" width="41" height="40"/>
<image name="ic_walk_off" width="41" height="40"/>
<image name="ic_walk_on" width="41" height="40"/>
</resources>
</document>

View file

@ -188,14 +188,14 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState)
{
m2::PointD const & destination = m_userMark->GetUserMark()->GetOrg();
m2::PointD const myPosition (ToMercator([MapsAppDelegate theApp].m_locationManager.lastLocation.coordinate));
[self.delegate buildRouteFrom:{myPosition} to:{destination, self.placePage.basePlacePageView.titleLabel.text}];
[self.delegate buildRouteFrom:MWMRoutePoint(myPosition) to:{destination, self.placePage.basePlacePageView.titleLabel.text}];
}
- (void)routeFrom
{
UserMark const * m = m_userMark->GetUserMark();
if (m->GetMarkType() == UserMark::Type::MY_POSITION)
[self.delegate buildRouteFrom:{m->GetOrg()}];
[self.delegate buildRouteFrom:MWMRoutePoint(m->GetOrg())];
else
[self.delegate buildRouteFrom:{m->GetOrg(), self.placePage.basePlacePageView.titleLabel.text}];
}
@ -204,7 +204,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState)
{
UserMark const * m = m_userMark->GetUserMark();
if (m->GetMarkType() == UserMark::Type::MY_POSITION)
[self.delegate buildRouteTo:{m->GetOrg()}];
[self.delegate buildRouteTo:MWMRoutePoint(m->GetOrg())];
else
[self.delegate buildRouteTo:{m->GetOrg(), self.placePage.basePlacePageView.titleLabel.text}];
}