DingiMultiPolygon


@interface DingiMultiPolygon : DingiShape <DingiOverlay>

An DingiMultiPolygon 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 DingiPolygon 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 DingiShapeSource object. Configure the appearance of an DingiShapeSource’s or DingiVectorTileSource’s multipolygons collectively using an DingiFillStyleLayer or DingiSymbolStyleLayer object.

You cannot add an DingiMultiPolygon object directly to a map view using -[DingiMapView addAnnotation:] or -[DingiMapView addOverlay:]. However, you can add the polygons array’s items as overlays individually.

  • An array of polygons forming the multipolygon.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSArray<DingiPolygon *> *_Nonnull polygons;

    Swift

    var polygons: [DingiPolygon] { get }
  • Creates and returns a multipolygon object consisting of the given polygons.

    Declaration

    Objective-C

    + (nonnull instancetype)multiPolygonWithPolygons:
        (nonnull NSArray<DingiPolygon *> *)polygons;

    Swift

    convenience init(polygons: [DingiPolygon])

    Parameters

    polygons

    The array of polygons defining the shape.

    Return Value

    A new multipolygon object.