openlayers/ol3 — pull request #3022 by ahocevar (2014-12-08 12:16:15+00:00)
Title: [WIP] Introduce geometryFunction for rendering

This is an alternative to #3010.

`ol.layer.Vector`, `ol.FeatureOverlay` and `ol.source.ImageVector` now support a new geometryFunction option. This function, called with the feature, the resolution and a style, allows application developers to return a geometry different from the original feature geometry.

I'm going to add an example and also add a `geometryFunction` option to the interactions that create a feature overlay, but before I spend more time on it I would like to hear from @tschaub and @elemoine if this approach is better than #3010.

Oh, and @tsauerwein, if this is used to draw an arrow on a linestring, you can use `setRotation()` on the arrow style that is passed to the `geometryFunction` to set the rotation that you calculate from the line segment's gradient.