summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLFeature.h
diff options
context:
space:
mode:
authorituaijagbone <i.ijagbone@gmail.com>2016-09-29 16:44:10 -0700
committerJesse Bounds <jesse@rebounds.net>2016-10-14 14:59:28 -0700
commitf558f6bc4a12fc621589c0b0f50d42c18e00453c (patch)
treec43e9b4722d72b8220e936719cbe14a8f9fa5958 /platform/darwin/src/MGLFeature.h
parent242c7f8fe62eb863cf300855aee2f04022311288 (diff)
downloadqtlocation-mapboxgl-f558f6bc4a12fc621589c0b0f50d42c18e00453c.tar.gz
[ios, macos] Add feature initializer
This adds a features initializer to MGLGeoJSONSource. The initializer takes shapes and converts them to JSON representation before passing to core. This also adds methods to the MGLShape concrete subclasses so that they can represent themselves in NSDictionary form suitable for transforming to JSON (GeoJSON).
Diffstat (limited to 'platform/darwin/src/MGLFeature.h')
-rw-r--r--platform/darwin/src/MGLFeature.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLFeature.h b/platform/darwin/src/MGLFeature.h
index aec4223b12..d187e9cf06 100644
--- a/platform/darwin/src/MGLFeature.h
+++ b/platform/darwin/src/MGLFeature.h
@@ -83,6 +83,10 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, copy, readonly) NS_DICTIONARY_OF(NSString *, id) *attributes;
+
+
+- (NS_DICTIONARY_OF(NSString *, id) *)featureDictionary;
+
/**
Returns the feature attribute for the given attribute name.
@@ -140,6 +144,11 @@ NS_ASSUME_NONNULL_BEGIN
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
*/
@interface MGLShapeCollectionFeature : MGLShapeCollection <MGLFeature>
+
+@property (nonatomic, copy, readonly) NS_ARRAY_OF(MGLShape<MGLFeature> *) *shapes;
+
++ (instancetype)shapeCollectionWithShapes:(NS_ARRAY_OF(MGLShape<MGLFeature> *) *)shapes;
+
@end
NS_ASSUME_NONNULL_END