forked from organicmaps/organicmaps
iPhone uses set/get router functions
This commit is contained in:
parent
51eb668201
commit
92863f7983
3 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,8 @@ static NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
|
|||
BOOL const isMyPosition = placePage.manager.entity.type == MWMPlacePageEntityTypeMyPosition;
|
||||
bar.routeButton.hidden = isMyPosition;
|
||||
bar.autoresizingMask = UIViewAutoresizingNone;
|
||||
NSString * routeImageName = [MapsAppDelegate theApp].isPedestrianRoutingMode ? @"ic_route_walk" : @"ic_route";
|
||||
BOOL const isPedestrian = GetFramework().GetRouter() == routing::RouterType::Pedestrian;
|
||||
NSString * routeImageName = isPedestrian ? @"ic_route_walk" : @"ic_route";
|
||||
[bar.routeButton setImage:[UIImage imageNamed:routeImageName] forState:UIControlStateNormal];
|
||||
return bar;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
@property (nonatomic, weak) IBOutlet MapViewController * m_mapViewController;
|
||||
@property (nonatomic, readonly) LocationManager * m_locationManager;
|
||||
@property (nonatomic) BOOL isPedestrianRoutingMode;
|
||||
|
||||
+ (MapsAppDelegate *)theApp;
|
||||
|
||||
|
|
|
@ -402,10 +402,10 @@ static BOOL keyboardLoaded = NO;
|
|||
if (!isPedestrian && !isVehicle)
|
||||
return NO;
|
||||
|
||||
MapsAppDelegate * delegate = [MapsAppDelegate theApp];
|
||||
delegate.isPedestrianRoutingMode = isPedestrian;
|
||||
[self search:cmd];
|
||||
GetFramework().SetRouter(isPedestrian ? routing::RouterType::Pedestrian : routing::RouterType::Vehicle);
|
||||
|
||||
[self searchBarDidPressCancelButton:nil];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue