context can now be given as argument in StyleMap.addUniqueValueRules()
this, for example, allows user to access to properties that are not part of the feature attributes. r=elemoine (closes #1548) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7216 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -173,6 +173,9 @@ OpenLayers.Rule = OpenLayers.Class({
|
||||
if (!context) {
|
||||
context = feature.attributes || feature.data;
|
||||
}
|
||||
if (typeof this.context == "function") {
|
||||
context = this.context(feature);
|
||||
}
|
||||
return context;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user