new FlowLine(options)
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Extends
Methods
-
_render(geom, e)
-
Renderer function
Parameters:
Name Type Description geom
Array.<ol.coordinate> The pixel coordinates of the geometry in GeoJSON notation
e
ol.render.State The olx.render.State of the layer renderer
-
_splitAsize(geom, asize, end)
-
Split extremity at
Parameters:
Name Type Description geom
ol.geom.LineString asize
number end
boolean start=false or end=true, default false (start)
-
_splitInto(geom, nb, nim)
-
Split line geometry into equal length geometries
Parameters:
Name Type Description geom
Array.<ol.coordinate> nb
number number of resulting geometries, default 255
nim
number minimum length of the resulting geometries, default 1
-
getArrow()
-
Get arrow
-
getArrowSize()
-
getArrowSize
Returns:
- Type
- ol.size
-
getColor(feature, step)
-
Get the current color at step
Parameters:
Name Type Description feature
ol.feature step
number current drawing step beetween [0,1]
Returns:
- Type
- string
-
getOffset(where)
-
Get offset at start or end
Parameters:
Name Type Description where
number 0=start, 1=end
Returns:
width
- Type
- number
-
getWidth(feature, step)
-
Get the current width at step
Parameters:
Name Type Description feature
ol.feature step
number current drawing step beetween [0,1]
Returns:
- Type
- number
-
setArrow(n)
-
Set arrow
Parameters:
Name Type Description n
number 1 | 0 | 1 | 2, default: 0
-
setArrowColor(color)
-
Set the arrow color
Parameters:
Name Type Description color
ol.colorLike -
setArrowSize(size)
-
setArrowSize
Parameters:
Name Type Description size
number | ol.size -
setColor(color)
-
Set the initial color
Parameters:
Name Type Description color
ol.colorLike -
setColor2(color)
-
Set the final color
Parameters:
Name Type Description color
ol.colorLike -
setLineCap(cap)
-
Set the LineCap
Parameters:
Name Type Description cap
steing LineCap (round or butt), default butt
-
setOffset(width, where)
-
Add an offset at start or end
Parameters:
Name Type Description width
number where
number 0=start, 1=end
-
setWidth(width)
-
Set the initial width
Parameters:
Name Type Description width
number width, default 0
-
setWidth2(width)
-
Set the final width
Parameters:
Name Type Description width
number width, default 0