public static abstract class TrafficStyle.Builder extends Object
Builder for
TrafficStyle
.
Fields in the style that are left null
will be replaced by default values
when the style is set in
ConsumerMapStyle
.
Public Constructor Summary
Builder()
|
Public Method Summary
abstract TrafficStyle |
build()
Creates a new
TrafficStyle from the builder.
|
abstract TrafficStyle.Builder |
setTrafficColor(int speedType, Integer color)
Sets the polyline color for a given traffic speed type.
|
abstract TrafficStyle.Builder |
Inherited Method Summary
Public Constructors
public Builder ()
Public Methods
public abstract TrafficStyle build ()
Creates a new
TrafficStyle
from the builder.
Returns
- a new
TrafficStyle
instance.
public abstract TrafficStyle.Builder setTrafficColor (int speedType, Integer color)
Sets the polyline color for a given traffic speed type.
Parameters
speedType | the traffic speed type. |
---|---|
color | the color for the given traffic speed type. |
Returns
- the builder instance.
Throws
IllegalArgumentException | if the speedType parameter is invalid. |
---|
public abstract TrafficStyle.Builder setTrafficVisibility (Boolean visibility)
Sets whether traffic is enabled for this style.
Parameters
visibility | whether traffic is enabled. Default is false. |
---|
Returns
- the builder instance.