GMTCMutablePolygonStyleOptions 类参考

GMTCMutablePolygonStyleOptions 类参考

概览

包含多段线自定义属性的可变数据对象。

继承 GMTCPolylineStyleOptions

公开成员函数

(void) - setTrafficColorForSpeed:color:
 设置指定速度类型的颜色。
(UIColor *)- trafficColorForSpeed
 返回指定速度类型的颜色。
(实例类型)- init
 使用以下默认值初始化对象:`strokeWidth:2.0f`、`strokeColor:[UIColor blueColor]`、`isVisible:YES`、`zIndex:10`、`isGeodesic:NO`、`isTrafficEnabled:NO`。

属性

CGFloatstrokeWidth
 线的描边宽度(以屏幕点为单位)。
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]

线的描边宽度(以屏幕点为单位)。

如果此处设置的值无效(小于 0.0f),则会设为默认值 2.0f。

实现 GMTCPolylineStyleOptions

- (UIColor*) strokeColor [read, write, copy]

用于指定一条或多条折线的颜色。

如果设为 NULL,则会设为默认值 [UIColor blueColor]。

实现 GMTCPolylineStyleOptions

- (BOOL) 可见isVisible [read, write, assign]

用于确定多段线可见性的布尔值。

默认值为 YES。

实现 GMTCPolylineStyleOptions

- (int32_t) zIndex [read, write, assign]

用于确定多段线的 Z 索引的值。

默认值为 10。

实现 GMTCPolylineStyleOptions

- (BOOL) isGeodesic [read, write, assign]

指示多段线的线段是否应绘制为测地线,而不是墨卡托投影法上的直线。

实现 GMTCPolylineStyleOptions

- (BOOL) isTrafficEnabled [read, write, assign]

用于确定路况多段线可见性的布尔值。

默认值为 NO。

实现 GMTCPolylineStyleOptions