# GoogleRidesharingConsumer Framework Reference

# GMTCPolylineStyleOptions

    @interface GMTCPolylineStyleOptions
        : https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCImmutableData.html <NSCopying, NSMutableCopying>

Data object that holds polyline customization properties.
- `


  ### [strokeWidth](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions#/c:objc(cs)GMTCPolylineStyleOptions(py)strokeWidth)


  ` The width of the line stroke in screen points. Defaults to 2.0f.

  #### Declaration

  Swift

      var strokeWidth: CGFloat { get }

  Objective-C

      @property (nonatomic, readonly) CGFloat strokeWidth;

- `


  ### [strokeColor](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions#/c:objc(cs)GMTCPolylineStyleOptions(py)strokeColor)


  ` Used to specify the color of one or more segments of a polyline. Defaults to
  `[UIColor blueColor]`.

  #### Declaration

  Swift

      @NSCopying var strokeColor: UIColor { get }

  Objective-C

      @property (nonatomic, copy, readonly) UIColor *_Nonnull strokeColor;

- `


  ### [isVisible](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions#/c:objc(cs)GMTCPolylineStyleOptions(py)isVisible)


  ` Boolean that determines the visibility of the polyline. Defaults to YES.

  #### Declaration

  Swift

      var isVisible: Bool { get }

  Objective-C

      @property (nonatomic, readonly) BOOL isVisible;

- `


  ### [zIndex](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions#/c:objc(cs)GMTCPolylineStyleOptions(py)zIndex)


  ` Value that determines the z index of the polyline. Defaults to 10.

  #### Declaration

  Swift

      var zIndex: Int32 { get }

  Objective-C

      @property (nonatomic, readonly) int32_t zIndex;

- `


  ### [isGeodesic](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions#/c:objc(cs)GMTCPolylineStyleOptions(py)isGeodesic)


  ` Indicates whether the segments of the polyline should be drawn as geodesics, as opposed to
  straight lines on the Mercator projection.

  #### Declaration

  Swift

      var isGeodesic: Bool { get }

  Objective-C

      @property (nonatomic, readonly) BOOL isGeodesic;

- `


  ### [isTrafficEnabled](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions#/c:objc(cs)GMTCPolylineStyleOptions(py)isTrafficEnabled)


  ` Boolean that determines the visibility of the traffic polyline. Defaults to NO.

  #### Declaration

  Swift

      var isTrafficEnabled: Bool { get }

  Objective-C

      @property (nonatomic, readonly) BOOL isTrafficEnabled;

- `


  ### [-trafficColorForSpeed:](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions#/c:objc(cs)GMTCPolylineStyleOptions(im)trafficColorForSpeed:)


  ` Returns the color for the given speed type.

  #### Declaration

  Swift

      func trafficColor(for speedType: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSSpeedType.html) -> UIColor

  Objective-C

      - (nonnull UIColor *)trafficColorForSpeed:(https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSSpeedType.html)speedType;

  #### Return Value

  If traffic is enabled and no color is set, returns the default color for the given speed.
  If traffic is not enabled, returns the default stroke color.
- `


  ### [-init](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions#/c:objc(cs)GMTCPolylineStyleOptions(im)init)


  ` Initializes the object with default values: `strokeWidth:2.0f`, `strokeColor:[UIColor
  blueColor]`, `isVisible:YES`, `zIndex:10`, `isGeodesic:NO`, `isTrafficEnabled:NO`.

  #### Declaration

  Swift

      init()

  Objective-C

      - (nonnull instancetype)init;