diff options
-rw-r--r-- | platform/darwin/src/MGLPointAnnotation.h | 13 | ||||
-rw-r--r-- | platform/darwin/src/MGLPointAnnotation.m | 7 | ||||
-rw-r--r-- | platform/darwin/src/MGLShape.h | 13 |
3 files changed, 18 insertions, 15 deletions
diff --git a/platform/darwin/src/MGLPointAnnotation.h b/platform/darwin/src/MGLPointAnnotation.h index 13afcab717..c2c43d2e07 100644 --- a/platform/darwin/src/MGLPointAnnotation.h +++ b/platform/darwin/src/MGLPointAnnotation.h @@ -1,6 +1,11 @@ #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> +#if TARGET_OS_IPHONE +#import <UIKit/UIKit.h> +#import "MGLCalloutView.h" +#endif + #import "MGLShape.h" #import "MGLTypes.h" @@ -20,6 +25,14 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, assign) CLLocationCoordinate2D coordinate; +#if TARGET_OS_IPHONE + +@property (nonatomic) BOOL canShowCallout; + +@property (nonatomic, nullable) UIView <MGLCalloutView> *calloutView; + +#endif + @end NS_ASSUME_NONNULL_END diff --git a/platform/darwin/src/MGLPointAnnotation.m b/platform/darwin/src/MGLPointAnnotation.m index 9495a2c6f8..f23382049a 100644 --- a/platform/darwin/src/MGLPointAnnotation.m +++ b/platform/darwin/src/MGLPointAnnotation.m @@ -3,14 +3,17 @@ @implementation MGLPointAnnotation @synthesize coordinate; +@synthesize canShowCallout; +@synthesize calloutView; - (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p; title = %@; subtitle = %@; coordinate = %f, %f>", + return [NSString stringWithFormat:@"<%@: %p; title = %@; subtitle = %@; coordinate = %f, %f; callout: %@ (%@)>", NSStringFromClass([self class]), (void *)self, self.title ? [NSString stringWithFormat:@"\"%@\"", self.title] : self.title, self.subtitle ? [NSString stringWithFormat:@"\"%@\"", self.subtitle] : self.subtitle, - coordinate.latitude, coordinate.longitude]; + coordinate.latitude, coordinate.longitude, + canShowCallout ? @"yes" : @"no", calloutView]; } @end diff --git a/platform/darwin/src/MGLShape.h b/platform/darwin/src/MGLShape.h index 8a43c75950..40c92fc32d 100644 --- a/platform/darwin/src/MGLShape.h +++ b/platform/darwin/src/MGLShape.h @@ -1,10 +1,5 @@ #import <Foundation/Foundation.h> -#if TARGET_OS_IPHONE -#import <UIKit/UIKit.h> -#import "MGLCalloutView.h" -#endif - #import "MGLAnnotation.h" #import "MGLTypes.h" @@ -31,14 +26,6 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy, nullable) NSString *subtitle; -#if TARGET_OS_IPHONE - -@property (nonatomic) BOOL canShowCallout; - -@property (nonatomic, nullable) UIView <MGLCalloutView> *calloutView; - -#endif - #if !TARGET_OS_IPHONE /** |