From f558f6bc4a12fc621589c0b0f50d42c18e00453c Mon Sep 17 00:00:00 2001 From: ituaijagbone Date: Thu, 29 Sep 2016 16:44:10 -0700 Subject: [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). --- platform/darwin/src/MGLPolygon+MGLAdditions.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 platform/darwin/src/MGLPolygon+MGLAdditions.h (limited to 'platform/darwin/src/MGLPolygon+MGLAdditions.h') diff --git a/platform/darwin/src/MGLPolygon+MGLAdditions.h b/platform/darwin/src/MGLPolygon+MGLAdditions.h new file mode 100644 index 0000000000..c9ef95b6bc --- /dev/null +++ b/platform/darwin/src/MGLPolygon+MGLAdditions.h @@ -0,0 +1,15 @@ +// +// MGLPolygonFeature+MGLAdditions.h +// ios +// +// Created by Mapbox on 9/30/16. +// Copyright © 2016 Mapbox. All rights reserved. +// + +#import + +@interface MGLPolygon (MGLAdditions) + +- (NS_ARRAY_OF(id) *)mgl_coordinates; + +@end -- cgit v1.2.1