Use a Style or a Style function as parameter to setStyle action

This commit is contained in:
Willem Dantuma
2020-02-13 16:01:05 +01:00
parent 4814b8fbad
commit 6060a8b86a
3 changed files with 7 additions and 4 deletions

View File

@@ -120,7 +120,10 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
key = 'file';
}
}
var styleEntry = this.stylesCache[key];
var styleEntry = this.stylesCache[key];
if(typeof styleEntry === 'function') {
return styleEntry(feature);
}
return styleEntry;
});
}