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
feature
feature
Return Value
new feature collection
-
Create
Declaration
Objective-C
+ (SFGFeatureCollection *)featureCollectionWithFeatures: (NSArray<SFGFeature *> *)features;
Parameters
features
array of features
Return Value
new feature collection
-
Create
Declaration
Objective-C
+ (SFGFeatureCollection *)featureCollectionWithTree:(NSDictionary *)tree;
Parameters
tree
JSON 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
feature
feature
Return Value
new feature collection
-
Initialize
Declaration
Objective-C
- (instancetype)initWithFeatures:(NSArray<SFGFeature *> *)features;
Swift
init!(features: [SFGFeature]!)
Parameters
features
array of features
Return Value
new feature collection
-
Initialize
Declaration
Objective-C
- (instancetype)initWithTree:(NSDictionary *)tree;
Swift
init!(tree: [AnyHashable : Any]!)
Parameters
tree
JSON tree
Return Value
new feature
-
Add a feature
Declaration
Objective-C
- (void)addFeature:(SFGFeature *)feature;
Swift
func addFeature(_ feature: SFGFeature!)
Parameters
feature
feature
-
Add the features
Declaration
Objective-C
- (void)addFeatures:(NSArray<SFGFeature *> *)features;
Swift
func addFeatures(_ features: [SFGFeature]!)
Parameters
features
collection of features
-
Get the number of features
Declaration
Objective-C
- (int)numFeatures;
Swift
func numFeatures() -> Int32
Return Value
feature count
-
Get the feature at the index
Declaration
Objective-C
- (SFGFeature *)featureAtIndex:(int)index;
Swift
func feature(at index: Int32) -> SFGFeature!
Parameters
index
index
Return Value
feature
-
Get the geometry type
Declaration
Objective-C
- (enum SFGGeometryType)geometryType;
Swift
func geometryType() -> SFGGeometryType
Return 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