Merge pull request #4368 from marcjansen/fix-4367

Append KML placemark text style to existing styles
This commit is contained in:
Marc Jansen
2015-11-03 15:06:33 +01:00

View File

@@ -342,11 +342,7 @@ ol.format.KML.createNameStyleFunction_ = function(foundStyle, name) {
}); });
} }
var nameStyle = new ol.style.Style({ var nameStyle = new ol.style.Style({
fill: undefined, text: textStyle
image: undefined,
text: textStyle,
stroke: undefined,
zIndex: undefined
}); });
return nameStyle; return nameStyle;
}; };
@@ -394,7 +390,7 @@ ol.format.KML.createFeatureStyleFunction_ = function(style, styleUrl,
if (drawName) { if (drawName) {
nameStyle = ol.format.KML.createNameStyleFunction_(style[0], nameStyle = ol.format.KML.createNameStyleFunction_(style[0],
name); name);
return [style, nameStyle]; return style.concat(nameStyle);
} }
return style; return style;
} }