概览
包含多段线自定义属性的可变数据对象。
公开成员函数 | |
(void) | - setTrafficColorForSpeed:color: |
设置指定速度类型的颜色。 | |
(UIColor *) | - trafficColorForSpeed: |
返回指定速度类型的颜色。 | |
(实例类型) | - init |
使用以下默认值初始化对象:`strokeWidth:2.0f`、`strokeColor:[UIColor blueColor]`、`isVisible:YES`、`zIndex:10`、`isGeodesic:NO`、`isTrafficEnabled:NO`。 | |
属性 | |
CGFloat | strokeWidth |
线的描边宽度(以屏幕点为单位)。 | |
UIColor * | strokeColor |
用于指定一条或多条折线的颜色。 | |
BOOL | isVisible |
用于确定多段线可见性的布尔值。 | |
int32_t | zIndex |
用于确定多段线的 Z 索引的值。 | |
BOOL | isGeodesic |
指示多段线的线段是否应绘制为测地线,而不是墨卡托投影法上的直线。 | |
BOOL | isTrafficEnabled |
用于确定路况多段线可见性的布尔值。 |
成员函数文档
- (void) setTrafficColorForSpeed: | (GMTSSpeedType) | speedType | |
颜色: | (nullable UIColor *) | color [颜色] | |
设置指定速度类型的颜色。
如果将颜色设为 NULL,则系统会使用速度类型的默认颜色。
- 参数:
-
speedType 要应用颜色的速度类型。 颜色 要应用于速度类型的颜色。
- (UIColor *) trafficColorForSpeed: | (GMTSSpeedType) | speedType |
返回指定速度类型的颜色。
- 返回:
- 如果启用了路况信息,并且未设置颜色,则返回指定速度对应的默认颜色。如果未启用流量,则返回默认描边颜色。
- (instancetype) init |
使用以下默认值初始化对象:`strokeWidth:2.0f`、`strokeColor:[UIColor blueColor]`、`isVisible:YES`、`zIndex:10`、`isGeodesic:NO`、`isTrafficEnabled:NO`。
属性说明
- (CGFloat) strokeWidth [read, write, assign] |
- (UIColor*) strokeColor [read, write, copy] |
- (BOOL) 可见isVisible [read, write, assign] |
- (int32_t) zIndex [read, write, assign] |
- (BOOL) isGeodesic [read, write, assign] |
指示多段线的线段是否应绘制为测地线,而不是墨卡托投影法上的直线。
- (BOOL) isTrafficEnabled [read, write, assign] |