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.
|
* @param {ol.Feature} feature Feature.
|
||||||
*/
|
*/
|
||||||
function(feature) {
|
function(feature) {
|
||||||
var style = styleFunction(feature);
|
var styles = styleFunction(feature);
|
||||||
ol.renderer.vector.renderFeature(replayGroup, feature, style);
|
var i, ii = styles.length;
|
||||||
|
for (i = 0; i < ii; ++i) {
|
||||||
|
ol.renderer.vector.renderFeature(replayGroup, feature, styles[i]);
|
||||||
|
}
|
||||||
}, this);
|
}, this);
|
||||||
replayGroup.finish();
|
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;
|
ol.style.StyleFunction;
|
||||||
|
|||||||
Reference in New Issue
Block a user