summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLAnnotationView.h
diff options
context:
space:
mode:
authorFredrik Karlsson <bjorn.fredrik.karlsson@gmail.com>2016-06-14 13:12:56 +0200
committerGitHub <noreply@github.com>2016-06-14 13:12:56 +0200
commitd564302c6d376da123f01028124b1702b13ad1ef (patch)
tree65931c0ceec1c9cd0a990c5b75963a08eaab4410 /platform/ios/src/MGLAnnotationView.h
parenta557e1e2c9f76a9b01d2a973a9a162e14525a669 (diff)
downloadqtlocation-mapboxgl-d564302c6d376da123f01028124b1702b13ad1ef.tar.gz
[ios] fixes #5129 added annotation property to MGLAnnotationView (#5307)
Also added a test case for MGLAnnotationView
Diffstat (limited to 'platform/ios/src/MGLAnnotationView.h')
-rw-r--r--platform/ios/src/MGLAnnotationView.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h
index acf270dfcb..3b44432dc0 100644
--- a/platform/ios/src/MGLAnnotationView.h
+++ b/platform/ios/src/MGLAnnotationView.h
@@ -4,6 +4,8 @@
NS_ASSUME_NONNULL_BEGIN
+@protocol MGLAnnotation;
+
/** The MGLAnnotationView class is responsible for representing point-based annotation markers as a view. Annotation views represent an annotation object, which is an object that corresponds to the MGLAnnotation protocol. When an annotation’s coordinate point is visible on the map view, the map view delegate is asked to provide a corresponding annotation view. If an annotation view is created with a reuse identifier, the map view may recycle the view when it goes offscreen. */
@interface MGLAnnotationView : UIView
@@ -16,6 +18,13 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithReuseIdentifier:(nullable NSString *)reuseIdentifier;
/**
+ This property will be set to the associated annotation when the view is visible.
+
+ When the view is queued and waiting to be reused, the value will be set to nil.
+ */
+@property (nonatomic, readonly, nullable) id <MGLAnnotation> annotation;
+
+/**
The string that identifies that this annotation view is reusable. (read-only)
You specify the reuse identifier when you create the view. You use the identifier later to retrieve an annotation view that was