summaryrefslogtreecommitdiff
path: root/include/mbgl/ios/MGLPolygon.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/ios/MGLPolygon.h')
-rw-r--r--include/mbgl/ios/MGLPolygon.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/mbgl/ios/MGLPolygon.h b/include/mbgl/ios/MGLPolygon.h
new file mode 100644
index 0000000000..bd6907dbe7
--- /dev/null
+++ b/include/mbgl/ios/MGLPolygon.h
@@ -0,0 +1,17 @@
+#import <Foundation/Foundation.h>
+#import <CoreLocation/CoreLocation.h>
+
+#import "MGLMultiPoint.h"
+#import "MGLOverlay.h"
+
+/** The `MGLPolygon` class represents a shape consisting of one or more points that define a closed polygon. The points are connected end-to-end in the order they are provided. The first and last points are connected to each other to create the closed shape. */
+@interface MGLPolygon : MGLMultiPoint <MGLOverlay>
+
+/** Creates and returns an `MGLPolygon` object from the specified set of coordinates.
+* @param coords The array of coordinates defining the shape. The data in this array is copied to the new object.
+* @param count The number of items in the _`coords`_ array.
+* @return A new polygon object. */
++ (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords
+ count:(NSUInteger)count;
+
+@end