Style function returns an array of styles

This commit is contained in:
Éric Lemoine
2013-11-22 16:37:48 +01:00
parent 733da2dd70
commit 3820caade1
2 changed files with 6 additions and 3 deletions
@@ -124,8 +124,11 @@ ol.renderer.canvas.VectorLayer.prototype.prepareFrame =
* @param {ol.Feature} feature Feature.
*/
function(feature) {
var style = styleFunction(feature);
ol.renderer.vector.renderFeature(replayGroup, feature, style);
var styles = styleFunction(feature);
var i, ii = styles.length;
for (i = 0; i < ii; ++i) {
ol.renderer.vector.renderFeature(replayGroup, feature, styles[i]);
}
}, this);
replayGroup.finish();