Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/iphone
diff options
context:
space:
mode:
authorKirill Zhdanovich <kzhdanovich@gmail.com>2013-07-03 21:10:13 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:57:45 +0300
commit5543302a853bf18dec359d3259baa0dba43cf8b7 (patch)
tree843d669ba478f7ed5b1524ca590117a8c64c0a13 /iphone
parent5fee37789768d4290081d533bb67db31c8fe20f5 (diff)
[iOS] api mode clearing fixes
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Classes/MapViewController.h1
-rw-r--r--iphone/Maps/Classes/MapViewController.mm5
-rw-r--r--iphone/Maps/Classes/MapsAppDelegate.h2
-rw-r--r--iphone/Maps/Classes/PlacePreviewViewController.mm4
4 files changed, 10 insertions, 2 deletions
diff --git a/iphone/Maps/Classes/MapViewController.h b/iphone/Maps/Classes/MapViewController.h
index aa51c74df3..dd0d2de444 100644
--- a/iphone/Maps/Classes/MapViewController.h
+++ b/iphone/Maps/Classes/MapViewController.h
@@ -43,6 +43,7 @@ namespace search { struct AddressInfo; }
- (void)showBalloonWithCategoryIndex:(int)cat andBookmarkIndex:(int)bm;
- (void)prepareForApi;
+- (void)clearApiMode;
- (BOOL)shouldShowNavBar;
- (void)dismissPopover;
diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm
index 55855b7df2..a8c48e147f 100644
--- a/iphone/Maps/Classes/MapViewController.mm
+++ b/iphone/Maps/Classes/MapViewController.mm
@@ -687,20 +687,21 @@ NSInteger compareAddress(id l, id r, void * context)
}
}
-- (void) clearApiBar
+- (void) clearApiMode
{
_isApiMode = NO;
self.navigationController.navigationItem.title = @"";
GetFramework().ClearMapApiPoints();
[self Invalidate];
[self.navigationController setNavigationBarHidden:YES animated:YES];
+ GetFramework().GetBalloonManager().Hide();
}
-(void)returnToApiApp
{
NSString * backUrl = [NSString stringWithUTF8String:GetFramework().GetMapApiBackUrl().c_str()];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:backUrl]];
- [self clearApiBar];
+ [self clearApiMode];
}
-(BOOL) shouldShowNavBar
diff --git a/iphone/Maps/Classes/MapsAppDelegate.h b/iphone/Maps/Classes/MapsAppDelegate.h
index ca03066386..8cb723b780 100644
--- a/iphone/Maps/Classes/MapsAppDelegate.h
+++ b/iphone/Maps/Classes/MapsAppDelegate.h
@@ -29,4 +29,6 @@
- (void)disableDownloadIndicator;
- (void)enableDownloadIndicator;
+- (void)showMap;
+
@end
diff --git a/iphone/Maps/Classes/PlacePreviewViewController.mm b/iphone/Maps/Classes/PlacePreviewViewController.mm
index 4d7a794229..4539879430 100644
--- a/iphone/Maps/Classes/PlacePreviewViewController.mm
+++ b/iphone/Maps/Classes/PlacePreviewViewController.mm
@@ -14,6 +14,8 @@
#import "Statistics.h"
#import "PlaceAndCompasView.h"
#import "CompassView.h"
+#import "MapsAppDelegate.h"
+#import "MapViewController.mm"
#include "../../../search/result.hpp"
#include "../../../platform/platform.hpp"
@@ -162,6 +164,8 @@ typedef enum {APIPOINT, POI, MYPOSITION} Type;
[[UIApplication sharedApplication] openURL:url];
else
[[UIApplication sharedApplication] openURL:[self getBackUrl]];
+ [[MapsAppDelegate theApp].m_mapViewController clearApiMode];
+ [[MapsAppDelegate theApp] showMap];
}
}