Fix for Inline KML styles extracted even though extractStyles is false,
from Edgemaster. r=me, tests=me, (Closes #1576) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7607 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -541,17 +541,19 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
feature.style = this.getStyle(feature.attributes.styleUrl);
|
||||
}
|
||||
|
||||
// Make sure that <Style> nodes within a placemark are
|
||||
// processed as well
|
||||
var inlineStyleNode = this.getElementsByTagNameNS(featureNode,
|
||||
"*",
|
||||
"Style")[0];
|
||||
if (inlineStyleNode) {
|
||||
var inlineStyle= this.parseStyle(inlineStyleNode);
|
||||
if (inlineStyle) {
|
||||
feature.style = OpenLayers.Util.extend(
|
||||
feature.style, inlineStyle
|
||||
);
|
||||
if (this.extractStyles) {
|
||||
// Make sure that <Style> nodes within a placemark are
|
||||
// processed as well
|
||||
var inlineStyleNode = this.getElementsByTagNameNS(featureNode,
|
||||
"*",
|
||||
"Style")[0];
|
||||
if (inlineStyleNode) {
|
||||
var inlineStyle= this.parseStyle(inlineStyleNode);
|
||||
if (inlineStyle) {
|
||||
feature.style = OpenLayers.Util.extend(
|
||||
feature.style, inlineStyle
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user