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:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user