Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios] Document annotations-as-features limitations w/feature querying
Browse files Browse the repository at this point in the history
Also move visibleAnnotations next to visibleAnnotationsInRect:.
  • Loading branch information
friedbunny committed Aug 18, 2017
1 parent 001988f commit 78f16a6
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions platform/ios/src/MGLMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -990,16 +990,6 @@ MGL_EXPORT IB_DESIGNABLE
*/
@property (nonatomic, readonly, nullable) NS_ARRAY_OF(id <MGLAnnotation>) *annotations;

/**
The complete list of annotations associated with the receiver that are
currently visible.
The objects in this array must adopt the `MGLAnnotation` protocol. If no
annotations are associated with the map view or if no annotations associated
with the map view are currently visible, the value of this property is `nil`.
*/
@property (nonatomic, readonly, nullable) NS_ARRAY_OF(id <MGLAnnotation>) *visibleAnnotations;

/**
Adds an annotation to the map view.
Expand Down Expand Up @@ -1094,6 +1084,16 @@ MGL_EXPORT IB_DESIGNABLE
*/
- (nullable __kindof MGLAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;

/**
The complete list of annotations associated with the receiver that are
currently visible.
The objects in this array must adopt the `MGLAnnotation` protocol. If no
annotations are associated with the map view or if no annotations associated
with the map view are currently visible, the value of this property is `nil`.
*/
@property (nonatomic, readonly, nullable) NS_ARRAY_OF(id <MGLAnnotation>) *visibleAnnotations;

/**
Returns the list of annotations associated with the receiver that intersect with
the given rectangle.
Expand Down Expand Up @@ -1254,6 +1254,11 @@ MGL_EXPORT IB_DESIGNABLE
`-[MGLVectorSource featuresInSourceLayersWithIdentifiers:predicate:]` and
`-[MGLShapeSource featuresMatchingPredicate:]` methods on the relevant sources.
The returned features may also include features corresponding to annotations.
These features are not object-equal to the `MGLAnnotation` objects that were
originally added to the map. To query the map for annotations, use
`visibleAnnotations` or `-[MGLMapView visibleAnnotationsInRect:]`.
@note Layer identifiers are not guaranteed to exist across styles or different
versions of the same style. Applications that use this API must first set
the style URL to an explicitly versioned style using a convenience method
Expand Down

0 comments on commit 78f16a6

Please sign in to comment.