GoogleRidesharingConsumer Framework Reference

GMTCPolylineStyleOptions

@interface GMTCPolylineStyleOptions
    : GMTCImmutableData <NSCopying, NSMutableCopying>

Data object that holds polyline customization properties.

  • 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;
  • 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;
  • Boolean that determines the visibility of the polyline. Defaults to YES.

    Declaration

    Swift

    var isVisible: Bool { get }

    Objective-C

    @property (nonatomic, readonly) BOOL isVisible;
  • 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;
  • 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;
  • 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;
  • Returns the color for the given speed type.

    Declaration

    Swift

    func trafficColor(for speedType: GMTSSpeedType) -> UIColor

    Objective-C

    - (nonnull UIColor *)trafficColorForSpeed:(GMTSSpeedType)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.

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