GoogleNavigation Framework Reference

GMSPolyline

@interface GMSPolyline : GMSOverlay

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.

  • The path that describes this polyline.

    Declaration

    Swift

    @NSCopying var path: GMSPath? { get set }

    Objective-C

    @property (nonatomic, copy, nullable) GMSPath *path;
  • The width of the line in screen points. Defaults to 1.

    Declaration

    Swift

    var strokeWidth: CGFloat { get set }

    Objective-C

    @property (nonatomic) CGFloat strokeWidth;
  • 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;
  • Whether this line should be rendered with geodesic correction.

    Declaration

    Swift

    var geodesic: Bool { get set }

    Objective-C

    @property (nonatomic) BOOL geodesic;
  • Convenience constructor for GMSPolyline for a particular path. Other properties will have default values.

    Declaration

    Swift

    convenience init(path: GMSPath?)

    Objective-C

    + (nonnull instancetype)polylineWithPath:(nullable GMSPath *)path;
  • An array containing GMSStyleSpan, 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 strokeColor is used for the entire line instead.

    Declaration

    Swift

    var spans: [GMSStyleSpan]? { get set }

    Objective-C

    @property (nonatomic, copy, nullable) NSArray<GMSStyleSpan *> *spans;