setCustomTrafficColor method
- {@required Color smooth,
- @required Color slow,
- @required Color congestion,
- @required Color severeCongestion}
自定义路况颜色。
注意:如果需要自定义路况颜色,必须4种路况全都设置。4个参数全部合法时,自定义颜色才有效;否则全部使用默认的。
smooth 路况畅通对应的颜色
slow 路况缓行对应的颜色
congestion 路况拥堵对应的颜色
severeCongestion 路况严重拥堵对应的颜色
bool 成功返回true 失败false
Implementation
Future<bool> setCustomTrafficColor(
{@required Color smooth,
@required Color slow,
@required Color congestion,
@required Color severeCongestion}) async {
return await BMFMapDispatcherFactory()
.getMapStateDispatcher()
.setCustomTrafficColorDispatch(
_mapChannel, smooth, slow, congestion, severeCongestion);
}