A closed polygon shape.
SDKs
- iOS 4.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.2+
Framework
- Map
Kit
Declaration
class MKPolygon : MKMulti Point
Overview
The points you add to this overlay are connected end-to-end in the order you provide them. The first and last points are connected to each other to create a closed shape.
When creating a polygon, you can mask out portions of the polygon by specifying one or more interior polygons. For the polygons you specify, this class uses the even-odd fill rule to determine the final occupied area. When applied to overlapping polygons, this rule can cause specific regions to be masked out (and thereby removed) from the total occupied area. For more information about how fill rules are applied to paths, see Paths in Quartz 2D Programming Guide.
Important
In iOS 5.1 and earlier, the Map Kit framework uses the Google Mobile Maps (GMM) service to provide map data. Use of specific classes of this framework (and their associated interfaces) is subject to the Google Mobile Maps terms of service. You can find these terms of service at http://code.google.com/apis/maps/iphone/terms.html.