[OpenLayers-Users] addUniqueValueRules causes feature to disappear instead of changing it's style
Christian Benke
benkokakao at gmail.com
Fri Aug 10 06:02:35 PDT 2012
> However, i'm interested to get the filter-example working as well. I
> find it difficult to understand how the FeatureId-Class is supposed to
> work. I'm trying to apply this rule:
>
> var rulePoint = new OpenLayers.Rule({
> filter: new OpenLayers.Filter.FeatureId({
> type: OpenLayers.Filter.Function,
> fids: ['999'],
> evaluate:function(fid) {
> console.log(feature.fid);
> var x=0;
> return true;}
>
> }),
> symbolizer: {pointRadius: 20, fillColor: "red",
> fillOpacity: 0.7, strokeColor: "black"}
> });
> The whole filter doesn't seem to be called though, as the
> evaluate-function doesn't return anything when i select a feature. Do
> i miss anything else but "addRules" to make the rule/filter work?
I forgot to mention - i try to apply the rule above to the styleMap with:
styleMap.styles['select'].addRules[rulePoint]
More information about the Users
mailing list