summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLPolygon.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-05-23 08:47:10 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-05-27 21:42:31 -0700
commitc6683ee1d3baebf46f3397e7ed2e44e8a23dc8ed (patch)
tree3962b9433647f91436b0cb70344e272132935f80 /platform/darwin/src/MGLPolygon.h
parentc9520713ca5cc5352dada77de87aede97e7947f2 (diff)
downloadqtlocation-mapboxgl-c6683ee1d3baebf46f3397e7ed2e44e8a23dc8ed.tar.gz
[ios, osx] Feature querying; complex geometry classes
Added methods to MGLMapView that return the rendered features at a visible point or within a visible rectangle on the map, optionally restricted to a set of layers, plus voluminous documentation. Added several new geometry classes corresponding to distinct geometry types supported by geometry.hpp. Added parallel “feature” classes to represent these geometries along with tags (IDs) and attributes (properties) from the source. Grouped classes in the Foundation and SDK groups by theme. In iosapp, dropped pins’ callout views now display the name of the topmost named feature at that point. In osxapp, a long press on the map highlights the features under the cursor. Dropping a pin via the menu or context menu item shows the usual dropped pin, but the pin’s title is now the name of a feature under the cursor, if available, rather than “Dropped Pin”. Fixes the iOS/OS X side of #352.
Diffstat (limited to 'platform/darwin/src/MGLPolygon.h')
-rw-r--r--platform/darwin/src/MGLPolygon.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLPolygon.h b/platform/darwin/src/MGLPolygon.h
index 1a158874bb..a12e62b106 100644
--- a/platform/darwin/src/MGLPolygon.h
+++ b/platform/darwin/src/MGLPolygon.h
@@ -30,4 +30,28 @@ NS_ASSUME_NONNULL_BEGIN
@end
+/**
+ The `MGLMultiPolygon` class represents a shape consisting of one or more
+ polygons that do not overlap. For example, you would use an `MGLMultiPolygon`
+ object to represent an atoll together with an island in the atoll’s lagoon:
+ the atoll itself would be one `MGLPolygon` object, while the inner island would
+ be another.
+ */
+@interface MGLMultiPolygon : MGLShape <MGLOverlay>
+
+/**
+ An array of polygons forming the multipolygon.
+ */
+@property (nonatomic, copy, readonly) NS_ARRAY_OF(MGLPolygon *) *polygons;
+
+/**
+ Creates and returns a multipolygon object consisting of the given polygons.
+
+ @param polygons The array of polygons defining the shape.
+ @return A new multipolygon object.
+ */
++ (instancetype)multiPolygonWithPolygons:(NS_ARRAY_OF(MGLPolygon *) *)polygons;
+
+@end
+
NS_ASSUME_NONNULL_END