forked from organicmaps/organicmaps
[MAPSME-5047] Review fixes.
This commit is contained in:
parent
b36e213b12
commit
9c46e207c6
3 changed files with 15 additions and 11 deletions
|
@ -235,7 +235,6 @@ using namespace osm_auth_ios;
|
|||
case ParsedMapApi::ParsingResult::Route:
|
||||
{
|
||||
auto const parsedData = f.GetParsedRoutingData();
|
||||
MWMRouter.type = routerType(parsedData.m_type);
|
||||
auto const points = parsedData.m_points;
|
||||
if (points.size() == 2)
|
||||
{
|
||||
|
@ -245,7 +244,9 @@ using namespace osm_auth_ios;
|
|||
auto p2 = [[MWMRoutePoint alloc] initWithURLSchemeRoutePoint:points.back()
|
||||
type:MWMRoutePointTypeFinish
|
||||
intermediateIndex:0];
|
||||
[MWMRouter buildFromPoint:p1 toPoint:p2 bestRouter:NO];
|
||||
[MWMRouter buildApiRouteWithType:routerType(parsedData.m_type)
|
||||
startPoint:p1
|
||||
finishPoint:p2];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -41,9 +41,9 @@ typedef void (^MWMImageHeightBlock)(UIImage *, NSString *);
|
|||
|
||||
+ (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)buildApiRouteWithType:(MWMRouterType)type
|
||||
startPoint:(MWMRoutePoint *)startPoint
|
||||
finishPoint:(MWMRoutePoint *)finishPoint;
|
||||
+ (void)rebuildWithBestRouter:(BOOL)bestRouter;
|
||||
|
||||
+ (BOOL)hasRouteAltitude;
|
||||
|
|
|
@ -350,19 +350,22 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType)
|
|||
[self rebuildWithBestRouter:bestRouter];
|
||||
}
|
||||
|
||||
+ (void)buildFromPoint:(MWMRoutePoint *)startPoint
|
||||
toPoint:(MWMRoutePoint *)finishPoint
|
||||
bestRouter:(BOOL)bestRouter
|
||||
+ (void)buildApiRouteWithType:(MWMRouterType)type
|
||||
startPoint:(MWMRoutePoint *)startPoint
|
||||
finishPoint:(MWMRoutePoint *)finishPoint
|
||||
{
|
||||
if (!startPoint || !finishPoint)
|
||||
return;
|
||||
|
||||
[MWMRouter router].isAPICall = YES;
|
||||
[MWMRouter setType:type];
|
||||
|
||||
auto router = [MWMRouter router];
|
||||
router.isAPICall = YES;
|
||||
[self addPoint:startPoint];
|
||||
[self addPoint:finishPoint];
|
||||
[MWMRouter router].isAPICall = NO;
|
||||
router.isAPICall = NO;
|
||||
|
||||
[self rebuildWithBestRouter:bestRouter];
|
||||
[self rebuildWithBestRouter:NO];
|
||||
}
|
||||
|
||||
+ (void)rebuildWithBestRouter:(BOOL)bestRouter
|
||||
|
|
Loading…
Add table
Reference in a new issue