MGLMultiPolygon object represents a shape consisting of one or more
polygons that do not overlap. For example, you could use a multipolygon shape
to represent the body of land that consists of an island surrounded by an
atoll: the inner island would be one
MGLPolygon object, while the surrounding
atoll would be another. You could also use a multipolygon shape to represent a
group of disconnected but related buildings.
You can add multipolygon shapes to the map by adding them to an
MGLShapeSource object. Configure the appearance of an
MGLVectorTileSource’s multipolygons collectively using an
You cannot add an
MGLMultiPolygon object directly to a map view using
-[MGLMapView addAnnotation:] or
-[MGLMapView addOverlay:]. However, you can
polygons array’s items as overlays individually.
Creates and returns a multipolygon object consisting of the given polygons.
+ (nonnull instancetype)multiPolygonWithPolygons: (nonnull NSArray<MGLPolygon *> *)polygons;
convenience init(polygons: [MGLPolygon])
The array of polygons defining the shape.
A new multipolygon object.