# GoogleMaps Framework Reference

# GMSPolygon

    @interface GMSPolygon : https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSOverlay.html

`GMSPolygon` defines a polygon that appears on the map. A polygon (like a polyline) defines a
series of connected coordinates in an ordered sequence; additionally, polygons form a closed loop
and define a filled region.
- `


  ### [path](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon#/c:objc(cs)GMSPolygon(py)path)


  ` The path that describes this polygon. The coordinates composing the path must be valid.

  #### Declaration

  Swift

      @NSCopying var path: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html *path;

- `


  ### [holes](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon#/c:objc(cs)GMSPolygon(py)holes)


  ` The array of `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html` instances that describes any holes in this polygon. The coordinates
  composing each path must be valid.

  #### Declaration

  Swift

      var holes: [https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html]? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) NSArray<https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html *> *holes;

- `


  ### [strokeWidth](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon#/c:objc(cs)GMSPolygon(py)strokeWidth)


  ` The width of the polygon outline in screen points. Defaults to 1.

  #### Declaration

  Swift

      var strokeWidth: CGFloat { get set }

  Objective-C

      @property (nonatomic) CGFloat strokeWidth;

- `


  ### [strokeColor](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon#/c:objc(cs)GMSPolygon(py)strokeColor)


  ` The color of the polygon outline. Defaults to nil.

  #### Declaration

  Swift

      var strokeColor: UIColor? { get set }

  Objective-C

      @property (nonatomic, nullable) UIColor *strokeColor;

- `


  ### [fillColor](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon#/c:objc(cs)GMSPolygon(py)fillColor)


  ` The fill color. Defaults to blueColor.

  #### Declaration

  Swift

      var fillColor: UIColor? { get set }

  Objective-C

      @property (nonatomic, nullable) UIColor *fillColor;

- `


  ### [geodesic](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon#/c:objc(cs)GMSPolygon(py)geodesic)


  ` Whether this polygon should be rendered with geodesic correction.

  #### Declaration

  Swift

      var geodesic: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL geodesic;

- `


  ### [layer](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon#/c:objc(cs)GMSPolygon(py)layer)


  ` Provides the Core Animation layer for this `GMSPolygon`.

  #### Declaration

  Swift

      var layer: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygonLayer.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygonLayer.html *_Nonnull layer;

- `


  ### [+polygonWithPath:](https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolygon#/c:objc(cs)GMSPolygon(cm)polygonWithPath:)


  ` Convenience constructor for `GMSPolygon` for a particular path. Other properties will have
  default values.

  #### Declaration

  Swift

      convenience init(path: https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html?)

  Objective-C

      + (nonnull instancetype)polygonWithPath:(nullable https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html *)path;