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/api
diff options
context:
space:
mode:
authorAlex Zolotarev <alex@mapswithme.com>2013-07-04 21:44:10 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:57:59 +0300
commitd012b7e7cf6adb697770165e4ff90d2506f6c005 (patch)
treec9055427683ba2ff3f434e30cfd8da87e4ad12c9 /api
parentd6e13dec0247c88520cd207d908f86228974942c (diff)
[ios][api] Added simple showMap api call
Diffstat (limited to 'api')
-rw-r--r--api/iOS/src/MapsWithMeAPI.h2
-rw-r--r--api/iOS/src/MapsWithMeAPI.m5
2 files changed, 7 insertions, 0 deletions
diff --git a/api/iOS/src/MapsWithMeAPI.h b/api/iOS/src/MapsWithMeAPI.h
index 3a111c80ef..f11b3a07f6 100644
--- a/api/iOS/src/MapsWithMeAPI.h
+++ b/api/iOS/src/MapsWithMeAPI.h
@@ -55,6 +55,8 @@
+ (MWMPin *) pinFromUrl:(NSURL *)url;
// returns NO if MapsWithMe is not installed or outdated version doesn't support API calls
+ (BOOL) isApiSupported;
+// Simply opens MapsWithMe app
++ (BOOL) showMap;
// Displays given point on a map, title and id are optional
// If id contains valid url, it will be opened from MapsWithMe after selecting "More Details..." for the pin
+ (BOOL) showLat:(double)lat lon:(double)lon title:(NSString *)optionalTitle id:(NSString *)optionalId;
diff --git a/api/iOS/src/MapsWithMeAPI.m b/api/iOS/src/MapsWithMeAPI.m
index 8058654301..5bbe4e6b2f 100644
--- a/api/iOS/src/MapsWithMeAPI.m
+++ b/api/iOS/src/MapsWithMeAPI.m
@@ -127,6 +127,11 @@ static NSString * MWMUrlScheme = @"mapswithme://";
return [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:MWMUrlScheme]];
}
++ (BOOL) showMap
+{
+ return [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[MWMUrlScheme stringByAppendingFormat:@"map?v=%d", MAPSWITHME_API_VERSION]]];
+}
+
+ (BOOL) showLat:(double)lat lon:(double)lon title:(NSString *)optionalTitle id:(NSString *)optionalId
{
MWMPin * pin = [[[MWMPin alloc] initWithLat:lat lon:lon title:optionalTitle id:optionalId] autorelease];