new ol.style.Stroke(opt_options)
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options.
|
|||||||||||||||||||||||||
Methods
-
Clones the style.
Returns:
The cloned style.
-
Get the stroke color.
Returns:
Color.
-
getLineCap(){string|undefined}
src/ol/style/stroke.js, line 105 -
Get the line cap type for the stroke.
Returns:
Line cap.
-
getLineDash(){Array.<number>}
src/ol/style/stroke.js, line 115 -
Get the line dash style for the stroke.
Returns:
Line dash.
-
getLineDashOffset(){number|undefined}
src/ol/style/stroke.js, line 125 -
Get the line dash offset for the stroke.
Returns:
Line dash offset.
-
getLineJoin(){string|undefined}
src/ol/style/stroke.js, line 135 -
Get the line join type for the stroke.
Returns:
Line join.
-
getMiterLimit(){number|undefined}
src/ol/style/stroke.js, line 145 -
Get the miter limit for the stroke.
Returns:
Miter limit.
-
getWidth(){number|undefined}
src/ol/style/stroke.js, line 155 -
Get the stroke width.
Returns:
Width.
-
setColor(color)
src/ol/style/stroke.js, line 166 -
Set the color.
Name Type Description colorol.Color | ol.ColorLike Color.
-
setLineCap(lineCap)
src/ol/style/stroke.js, line 178 -
Set the line cap.
Name Type Description lineCapstring | undefined Line cap.
-
setLineDash(lineDash)
src/ol/style/stroke.js, line 196 -
Set the line dash.
Please note that Internet Explorer 10 and lower do not support the
setLineDashmethod on theCanvasRenderingContext2Dand therefore this property will have no visual effect in these browsers.Name Type Description lineDashArray.<number> Line dash.
-
setLineDashOffset(lineDashOffset)
src/ol/style/stroke.js, line 208 -
Set the line dash offset.
Name Type Description lineDashOffsetnumber | undefined Line dash offset.
-
setLineJoin(lineJoin)
src/ol/style/stroke.js, line 220 -
Set the line join.
Name Type Description lineJoinstring | undefined Line join.
-
setMiterLimit(miterLimit)
src/ol/style/stroke.js, line 232 -
Set the miter limit.
Name Type Description miterLimitnumber | undefined Miter limit.
-
setWidth(width)
src/ol/style/stroke.js, line 244 -
Set the width.
Name Type Description widthnumber | undefined Width.
OpenLayers