Simple fix to KML style parsing (from Edgemaster). This change makes getStyle

return clones. Since the results of getStyle are extended later in the code
by the inlineStyle, this fixes a case where kml.styleUrl symbolizers can 
be changed by <Style> blocks attached to features which share a style.
r=me. (Closes #1578)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@8776 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2009-01-28 02:07:09 +00:00
parent 256f027c7c
commit 32ca128b18
2 changed files with 10 additions and 1 deletions

View File

@@ -663,7 +663,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
}
// return requested style
var style = this.styles[styleUrl];
var style = OpenLayers.Util.extend({}, this.styles[styleUrl]);
return style;
},