Overview
Mutable data object that holds polyline customization properties.
Inherits GMTCPolylineStyleOptions.
Public Member Functions | |
(void) | - setTrafficColorForSpeed:color: |
Sets the color for the given speed type. | |
(UIColor *) | - trafficColorForSpeed: |
Returns the color for the given speed type. | |
(instancetype) | - init |
Initializes the object with default values: `strokeWidth:2.0f`, `strokeColor:[UIColor blueColor]`, `isVisible:YES`, `zIndex:10`, `isGeodesic:NO`, `isTrafficEnabled:NO`. | |
Properties | |
CGFloat | strokeWidth |
The width of the line stroke in screen points. | |
UIColor * | strokeColor |
Used to specify the color of one or more segments of a polyline. | |
BOOL | isVisible |
Boolean that determines the visibility of the polyline. | |
int32_t | zIndex |
Value that determines the z index of the polyline. | |
BOOL | isGeodesic |
Indicates whether the segments of the polyline should be drawn as geodesics, as opposed to straight lines on the Mercator projection. | |
BOOL | isTrafficEnabled |
Boolean that determines the visibility of the traffic polyline. |
Member Function Documentation
- (void) setTrafficColorForSpeed: | (GMTSSpeedType) | speedType | |
color: | (nullable UIColor *) | 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.
- Parameters:
-
speedType The speed type to apply the color to. color The color to apply to the speed type.
- (UIColor *) trafficColorForSpeed: | (GMTSSpeedType) | speedType |
Returns the color for the given speed type.
- Returns:
- 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.
- (instancetype) init |
Initializes the object with default values: `strokeWidth:2.0f`, `strokeColor:[UIColor blueColor]`, `isVisible:YES`, `zIndex:10`, `isGeodesic:NO`, `isTrafficEnabled:NO`.
Property Documentation
- (CGFloat) strokeWidth [read, write, assign] |
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.
Implements GMTCPolylineStyleOptions.
- (UIColor*) strokeColor [read, write, copy] |
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].
Implements GMTCPolylineStyleOptions.
- (BOOL) isVisible [read, write, assign] |
Boolean that determines the visibility of the polyline.
Defaults to YES.
Implements GMTCPolylineStyleOptions.
- (int32_t) zIndex [read, write, assign] |
Value that determines the z index of the polyline.
Defaults to 10.
Implements GMTCPolylineStyleOptions.
- (BOOL) isGeodesic [read, write, assign] |
Indicates whether the segments of the polyline should be drawn as geodesics, as opposed to straight lines on the Mercator projection.
Implements GMTCPolylineStyleOptions.
- (BOOL) isTrafficEnabled [read, write, assign] |
Boolean that determines the visibility of the traffic polyline.
Defaults to NO.
Implements GMTCPolylineStyleOptions.