diff --git a/platform/darwin/src/MGLPointAnnotation.h b/platform/darwin/src/MGLPointAnnotation.h index 13afcab717d..c2c43d2e078 100644 --- a/platform/darwin/src/MGLPointAnnotation.h +++ b/platform/darwin/src/MGLPointAnnotation.h @@ -1,6 +1,11 @@ #import #import +#if TARGET_OS_IPHONE +#import +#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 *calloutView; + +#endif + @end NS_ASSUME_NONNULL_END diff --git a/platform/darwin/src/MGLPointAnnotation.m b/platform/darwin/src/MGLPointAnnotation.m index 9495a2c6f8d..f23382049a9 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 8a43c759507..40c92fc32d9 100644 --- a/platform/darwin/src/MGLShape.h +++ b/platform/darwin/src/MGLShape.h @@ -1,10 +1,5 @@ #import -#if TARGET_OS_IPHONE -#import -#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 *calloutView; - -#endif - #if !TARGET_OS_IPHONE /**