forked from organicmaps/organicmaps
[ios][api] Added some comments and minor fix
This commit is contained in:
parent
ff28ccd759
commit
d6e13dec02
2 changed files with 7 additions and 12 deletions
|
@ -34,7 +34,6 @@
|
|||
|
||||
// Wrapper for a pin on a map
|
||||
@interface MWMPin : NSObject
|
||||
|
||||
// [required] pin latitude and longitude
|
||||
@property (nonatomic, assign) double lat;
|
||||
@property (nonatomic, assign) double lon;
|
||||
|
@ -56,8 +55,12 @@
|
|||
+ (MWMPin *) pinFromUrl:(NSURL *)url;
|
||||
// returns NO if MapsWithMe is not installed or outdated version doesn't support API calls
|
||||
+ (BOOL) isApiSupported;
|
||||
// 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;
|
||||
// The same as above but using pin wrapper
|
||||
+ (BOOL) showPin:(MWMPin *)pin;
|
||||
// Displays any number of pins
|
||||
+ (BOOL) showPins:(NSArray *)pins;
|
||||
|
||||
@end
|
||||
|
|
|
@ -170,17 +170,9 @@ static NSString * MWMUrlScheme = @"mapswithme://";
|
|||
|
||||
NSURL * url = [[NSURL alloc] initWithString:str];
|
||||
[str release];
|
||||
if (url)
|
||||
{
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
[url release];
|
||||
return YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Can't generate correct url");
|
||||
return NO;
|
||||
}
|
||||
BOOL const result = [[UIApplication sharedApplication] openURL:url];
|
||||
[url release];
|
||||
return result;
|
||||
}
|
||||
|
||||
+ (NSString *) detectBackUrlScheme
|
||||
|
|
Loading…
Add table
Reference in a new issue