featuresMatchingPredicate method
Returns an array of map features for this source, filtered by the given predicate.
Each object in the returned array represents a feature for the current style
and provides access to attributes specified via the shape property.
Features come from tiled GeoJSON data that is converted to tiles internally, so feature geometries are clipped at tile boundaries and features may appear duplicated across tiles. For example, suppose this source contains a long polyline representing a road. The resulting array includes those parts of the road that lie within the map tiles that the source has loaded, even if the road extends into other tiles. The portion of the road within each map tile is included individually.
Returned features may not necessarily be visible to the user at the time they
are loaded: the style may lack a layer that draws the features in question. To
obtain only visible features, use the
MLNMapView/visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:
or
MLNMapView/visibleFeaturesInRect:inStyleLayersWithIdentifiers:predicate:
method.
@param predicate A predicate to filter the returned features. Use nil to
include all features in the source.
@return An array of objects conforming to the MLNFeature protocol that
represent features in the source that match the predicate.
Implementation
objc.NSArray featuresMatchingPredicate(NSPredicate? predicate) {
final _ret = _objc_msgSend_1sotr3r(this.ref.pointer, _sel_featuresMatchingPredicate_, predicate?.ref.pointer ?? ffi.nullptr);
return objc.NSArray.castFromPointer(_ret, retain: true, release: true);
}