Class MVStyleColor
MVStyleColor represents a client side constructed MapViewer COLOR style. You can specify the essential information, such as the name and fill/stroke colors when creating a MVStyleColor object. You can set other (optional) attributes through various setter methods, such as the opacity of fill/stroke, stroke pen width, as well as its description.
Constructor Attributes | Constructor Name and Description |
---|---|
MVStyleColor(name, fill, stroke)
|
Method Attributes | Method Name and Description |
---|---|
setDescription(desc)
Sets the description of this COLOR style.
|
|
setFill(fill)
Sets the fill color.
|
|
setFillOpacity(op)
Sets the opacity of the fill color.
|
|
setStroke(color)
Sets the stroke color used to draw shape boundaries.
|
|
setStrokeOpacity(op)
Sets the opacity of the stroke color.
|
|
setStrokeWidth(sw)
Sets the pen width when drawing the shape (boundary).
|
Class Detail
MVStyleColor(name, fill, stroke)
- Parameters:
- {string} name
- name of the COLOR style
- {string} fill
- filling color; must be a string in the format of "RRGGBB", or null if no filling.
- {string} stroke
- stroking color; must be a string in the format of "RRGGBB", or null if no stroking.
Method Detail
setDescription(desc)
Sets the description of this COLOR style.
- Parameters:
- {string} desc
- a short description of the style
setFill(fill)
Sets the fill color. Fill color is used to fill the interior of a shape.
- Parameters:
- fill
- the fill color specified in the format of "RRGGBB".
setFillOpacity(op)
Sets the opacity of the fill color. Opacity value ranges from 0
(completely transparent) to 255 (completely opaque). Default value
is 255.
- Parameters:
- {int} op
- the opacity value ([0 - 255]).
setStroke(color)
Sets the stroke color used to draw shape boundaries.
- Parameters:
- {string} color
- specified in the format of "RRGGBB", such as "FF0000" for a red color.
setStrokeOpacity(op)
Sets the opacity of the stroke color. Opacity value ranges from 0
(completely transparent) to 255 (completely opaque). Default value
is 255.
- Parameters:
- {int} op
- the opacity value ([0 - 255]).
setStrokeWidth(sw)
Sets the pen width when drawing the shape (boundary). Default is 1.
- Parameters:
- {float} sw
- stroke width in device point/pixel unit