ol-ext: Flow line style
The ol.style.FlowLine is a line style to draw LineString with variable colors and widths.
This can be used to display flows maps
or Sankey diagram on a map.
The widh and width2 options can be used to pass the initial and the final width of the lines.
The widh options can be a function that returns the current width giving a feature and a step (beetween [0,1]).
The color and color2 options can be used to pass the initial and the final color of the lines.
The color options can be a function that returns the current color giving a feature and a step (beetween [0,1]).
NB: the FlowLine style doesn't impress the hit-detection.
If you want your lines to be sectionable you have to add a style (with transparent line:
stroke color opacity to .1 or zero width) to handle this
(see defaultStyle in example or this issue).
Look at this example to see how to set a width and color function to control the line drawing.
It can be used to display elevation as color on a GPX tracks.