SFGFeatureCollection
Objective-C
@interface SFGFeatureCollection : SFGGeoJSONObject
Swift
class SFGFeatureCollection : SFGGeoJSONObject
Feature Collection
-
Collection of features
Declaration
Objective-C
@property (nonatomic, strong) NSMutableArray<SFGFeature *> *features;Swift
var features: NSMutableArray! { get set } -
Create
Declaration
Objective-C
+ (SFGFeatureCollection *)featureCollection;Return Value
new feature collection
-
Create
Declaration
Objective-C
+ (SFGFeatureCollection *)featureCollectionWithFeature:(SFGFeature *)feature;Parameters
featurefeature
Return Value
new feature collection
-
Create
Declaration
Objective-C
+ (SFGFeatureCollection *)featureCollectionWithFeatures: (NSArray<SFGFeature *> *)features;Parameters
featuresarray of features
Return Value
new feature collection
-
Create
Declaration
Objective-C
+ (SFGFeatureCollection *)featureCollectionWithTree:(NSDictionary *)tree;Parameters
treeJSON tree
Return Value
new feature
-
Initialize
Declaration
Objective-C
- (instancetype)init;Swift
init!()Return Value
new feature collection
-
Initialize
Declaration
Objective-C
- (instancetype)initWithFeature:(SFGFeature *)feature;Swift
init!(feature: SFGFeature!)Parameters
featurefeature
Return Value
new feature collection
-
Initialize
Declaration
Objective-C
- (instancetype)initWithFeatures:(NSArray<SFGFeature *> *)features;Swift
init!(features: [SFGFeature]!)Parameters
featuresarray of features
Return Value
new feature collection
-
Initialize
Declaration
Objective-C
- (instancetype)initWithTree:(NSDictionary *)tree;Swift
init!(tree: [AnyHashable : Any]!)Parameters
treeJSON tree
Return Value
new feature
-
Add a feature
Declaration
Objective-C
- (void)addFeature:(SFGFeature *)feature;Swift
func addFeature(_ feature: SFGFeature!)Parameters
featurefeature
-
Add the features
Declaration
Objective-C
- (void)addFeatures:(NSArray<SFGFeature *> *)features;Swift
func addFeatures(_ features: [SFGFeature]!)Parameters
featurescollection of features
-
Get the number of features
Declaration
Objective-C
- (int)numFeatures;Swift
func numFeatures() -> Int32Return Value
feature count
-
Get the feature at the index
Declaration
Objective-C
- (SFGFeature *)featureAtIndex:(int)index;Swift
func feature(at index: Int32) -> SFGFeature!Parameters
indexindex
Return Value
feature
-
Get the geometry type
Declaration
Objective-C
- (enum SFGGeometryType)geometryType;Swift
func geometryType() -> SFGGeometryTypeReturn Value
geometry type
-
Get the combined properties from all features
Declaration
Objective-C
- (NSDictionary<NSString *, NSString *> *)properties;Swift
func properties() -> [String : String]!Return Value
properties
View on GitHub
SFGFeatureCollection Class Reference