forked from organicmaps/organicmaps
Merge pull request #636 from VladiMihaylenko/vm-master
cherry-pick from release
This commit is contained in:
commit
427d1b89f6
11 changed files with 42 additions and 17 deletions
|
@ -113,13 +113,13 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
|
|||
{
|
||||
if (needToRebuild)
|
||||
{
|
||||
return [self defaultAlertWithTitle:@"Navigation is available only from your current location."
|
||||
message:@"Do you want us to recreate/rebuild/ plan the route?"
|
||||
return [self defaultAlertWithTitle:@"p2p_only_from_current"
|
||||
message:@"p2p_reroute_from_current"
|
||||
rightButtonTitle:@"ok" leftButtonTitle:@"cancel" rightButtonAction:block];
|
||||
}
|
||||
else
|
||||
{
|
||||
return [self defaultAlertWithTitle:@"dialog_routing_location_unknown"
|
||||
return [self defaultAlertWithTitle:@"p2p_only_from_current"
|
||||
message:nil rightButtonTitle:@"ok" leftButtonTitle:nil rightButtonAction:nil];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ public:
|
|||
|
||||
MWMRoutePoint(m2::PointD const & p, NSString * n) : m_point(p), m_name(n), m_isMyPosition(false) {}
|
||||
|
||||
explicit MWMRoutePoint(m2::PointD const & p) : m_point(p), m_name(L(@"my_position")), m_isMyPosition(true) {}
|
||||
explicit MWMRoutePoint(m2::PointD const & p) : m_point(p), m_name(L(@"p2p_your_location")), m_isMyPosition(true) {}
|
||||
|
||||
bool operator ==(MWMRoutePoint const & p) const
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<mutableArray key="HelveticaNeue.ttc">
|
||||
|
@ -125,7 +125,7 @@
|
|||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_go"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_start"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whiteColor"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueDark"/>
|
||||
|
|
|
@ -187,7 +187,7 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
|
|||
[self.delegate buildRouteTo:p];
|
||||
else
|
||||
f.ShowSearchResult(result);
|
||||
if (!IPAD)
|
||||
if (!IPAD && a.routingPlaneMode != MWMRoutingPlaneModeNone)
|
||||
a.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
self.state = MWMSearchManagerStateHidden;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="my_position"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_your_location"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
|
|
|
@ -408,12 +408,12 @@ static CGFloat const kAdditionalHeight = 20.;
|
|||
if (indexPath.row == 0)
|
||||
{
|
||||
cell.title.text = self.dataSource.source;
|
||||
cell.title.placeholder = L(@"choose_from");
|
||||
cell.title.placeholder = L(@"p2p_from");
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.title.text = self.dataSource.destination;
|
||||
cell.title.placeholder = L(@"choose_to");
|
||||
cell.title.placeholder = L(@"p2p_to");
|
||||
}
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<mutableArray key="HelveticaNeue.ttc">
|
||||
|
@ -48,6 +48,9 @@
|
|||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_route_planning"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_arrow_up_and_down" translatesAutoresizingMaskIntoConstraints="NO" id="y8P-JL-riK">
|
||||
<rect key="frame" x="128" y="9" width="8" height="8"/>
|
||||
|
@ -125,7 +128,7 @@
|
|||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_planning"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_route_planning"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<collectionView multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="TC0-58-PO9">
|
||||
<rect key="frame" x="8" y="48" width="304" height="80"/>
|
||||
|
@ -142,7 +145,7 @@
|
|||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_planning"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
|
@ -256,7 +259,7 @@
|
|||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_go"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_start"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whiteColor"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueDark"/>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#import <OpenGLES/EAGLDrawable.h>
|
||||
#import "Common.h"
|
||||
#import "EAGLView.h"
|
||||
#import "MWMDirectionView.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
|
@ -159,6 +160,19 @@ double getExactDPI()
|
|||
NSLog(@"EAGLView initRenderPolicy Ended");
|
||||
}
|
||||
|
||||
- (void)addSubview:(UIView *)view
|
||||
{
|
||||
[super addSubview:view];
|
||||
for (UIView * v in self.subviews)
|
||||
{
|
||||
if ([v isKindOfClass:[MWMDirectionView class]])
|
||||
{
|
||||
[self bringSubviewToFront:v];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setMapStyle:(MapStyle)mapStyle
|
||||
{
|
||||
Framework & f = GetFramework();
|
||||
|
|
|
@ -42,7 +42,6 @@ static CGFloat const kDirectionArrowSide = IPAD ? 260. : 160.;
|
|||
self.size = size;
|
||||
CGFloat const minimumBorderOffset = 40.;
|
||||
BOOL const isLandscape = size.width > size.height;
|
||||
[superview bringSubviewToFront:self];
|
||||
if (isLandscape)
|
||||
{
|
||||
CGFloat const defaultWidth = size.width - 2. * minimumBorderOffset - kDirectionArrowSide;
|
||||
|
|
|
@ -154,6 +154,9 @@
|
|||
<state key="normal" title="From">
|
||||
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_from_here"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="fromTap" destination="2HF-YO-IQi" eventType="touchUpInside" id="TlT-QT-gt8"/>
|
||||
</connections>
|
||||
|
@ -166,6 +169,9 @@
|
|||
<state key="normal" title="To">
|
||||
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_to_here"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="toTap" destination="2HF-YO-IQi" eventType="touchUpInside" id="cv9-Vs-6EE"/>
|
||||
</connections>
|
||||
|
|
Loading…
Add table
Reference in a new issue