A way to visualize flows between points in a map. Since this is done by modifying the segments that shape the line feature, width, color, opacity and other attributes can be controlled through all the line. In this case, increasing the line width and the opacity as the line goes from a source to a target.
As this example does clustering on the features, each change on the zoom resolution recalculates the flow lines.
Check flow-lines.js for the relevant stuff
Arcs are created by calculating Great Circles, thanks to arc.js
Not tested with hundreds or thousands of connections, so need to think about this beyond inmediate solutions such reducing the resolution of the arcs.
forked from XavierGimenez's block: Flow lines with openlayers maps
forked from scotttboone's block: Flow lines with openlayers maps
https://cdn.jsdelivr.net/lodash/4.17.4/lodash.min.js
https://d3js.org/d3.v3.min.js
https://cdnjs.cloudflare.com/ajax/libs/datalib/1.7.3/datalib.min.js
https://openlayers.org/en/v4.0.1/build/ol.js