# GoogleRidesharingConsumer Framework Reference

# GMTCMutablePolylineStyleOptions

    @interface GMTCMutablePolylineStyleOptions : https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCPolylineStyleOptions.html

Mutable data object that holds polyline customization properties.
- `


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


  ` The width of the line stroke in screen points. If an invalid value is set here (less than 0.0f),
  then it will be set to the default value of 2.0f.

  #### Declaration

  Swift

      var strokeWidth: CGFloat { get set }

  Objective-C

      @property (nonatomic) CGFloat strokeWidth;

- `


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


  ` Used to specify the color of one or more segments of a polyline. If set to NULL, then it will be
  set to the default value of `[UIColor blueColor]`.

  #### Declaration

  Swift

      @NSCopying var strokeColor: UIColor! { get set }

  Objective-C

      @property (nonatomic, copy, null_resettable) UIColor *strokeColor;

- `


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


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

  #### Declaration

  Swift

      var isVisible: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL isVisible;

- `


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


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

  #### Declaration

  Swift

      var zIndex: Int32 { get set }

  Objective-C

      @property (nonatomic) int32_t zIndex;

- `


  ### [isGeodesic](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCMutablePolylineStyleOptions#/c:objc(cs)GMTCMutablePolylineStyleOptions(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 set }

  Objective-C

      @property (nonatomic) BOOL isGeodesic;

- `


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


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

  #### Declaration

  Swift

      var isTrafficEnabled: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL isTrafficEnabled;

- `


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


  ` Sets the color for the given speed type. If color is set to NULL, then the
  default color for the speed type is used.

  #### Declaration

  Swift

      func setTrafficColorFor(_ speedType: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSSpeedType.html, color: UIColor?)

  Objective-C

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

  #### Parameters

  |---|---|
  | ` speedType ` | The speed type to apply the color to. |
  | ` color ` | The color to apply to the speed type. |