# GoogleMaps Framework Reference

# GMSPolyline

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

`GMSPolyline` specifies the available options for a polyline that exists on the Earth's surface.
It is drawn as a physical line between the points specified in `path`.
- `


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


  ` The path that describes this polyline.

  #### 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;

- `


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


  ` The width of the line 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/GMSPolyline#/c:objc(cs)GMSPolyline(py)strokeColor)


  ` The `UIColor` used to render the polyline. Defaults to `[UIColor blueColor]`.

  #### Declaration

  Swift

      var strokeColor: UIColor { get set }

  Objective-C

      @property (nonatomic) UIColor *_Nonnull strokeColor;

- `


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


  ` Whether this line should be rendered with geodesic correction.

  #### Declaration

  Swift

      var geodesic: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL geodesic;

- `


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


  ` Convenience constructor for `GMSPolyline` 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)polylineWithPath:(nullable https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPath.html *)path;

- `


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


  ` An array containing `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSStyleSpan.html`, the spans used to render this polyline.

  If this array contains fewer segments than the polyline itself, the final segment will be applied
  over the remaining length. If this array is unset or empty, then `https://developers.google.com/maps/documentation/ios-sdk/reference/objc/Classes/GMSPolyline.html#/c:objc(cs)GMSPolyline(py)strokeColor` is used for the
  entire line instead.

  #### Declaration

  Swift

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

  Objective-C

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