Make ol.style.Style a @struct

And take into account that `styles` may be a style or an array of style.
This commit is contained in:
Frederic Junod
2016-02-10 16:56:42 +01:00
parent a924908f12
commit f7e20377ec
3 changed files with 7 additions and 3 deletions
+3 -3
View File
@@ -2390,10 +2390,10 @@ ol.format.KML.writePlacemark_ = function(node, feature, objectStack) {
// FIXME the styles returned by the style function are supposed to be
// resolution-independent here
var styles = styleFunction.call(feature, 0);
if (styles && styles.length > 0) {
var style = styles[0];
if (styles) {
var style = goog.isArray(styles) ? styles[0] : styles;
if (this.writeStyles_) {
properties['Style'] = styles[0];
properties['Style'] = style;
}
var textStyle = style.getText();
if (textStyle) {