Style function returns an array of styles
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -41,6 +41,6 @@ ol.style.Style = function(options) {
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {function(ol.Feature): ol.style.Style}
|
||||
* @typedef {function(ol.Feature): Array.<ol.style.Style>}
|
||||
*/
|
||||
ol.style.StyleFunction;
|
||||
|
||||
Reference in New Issue
Block a user