create UserStyle in a way that propertyNames cache will be generated.

Thanks sonicx for catching this. r=tschaub (closes #2000)
r=tschaub


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9223 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-04-06 23:08:08 +00:00
parent a685884a4f
commit f59eceef71
2 changed files with 5 additions and 3 deletions

View File

@@ -137,8 +137,9 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
);
},
"UserStyle": function(node, layer) {
var style = new OpenLayers.Style(this.defaultSymbolizer);
this.readChildNodes(node, style);
var obj = {rules: []};
this.readChildNodes(node, obj);
var style = new OpenLayers.Style(this.defaultSymbolizer, obj);
layer.userStyles.push(style);
},
"IsDefault": function(node, style) {