[OpenLayers-Users] [Possible spoofed sender] Re: [Possible spoofed sender] Re: Like query with "singleChar" does not work correctly in OpenLayers.StyleMap
joaorodr84
joaorodr84 at gmail.com
Mon Apr 27 15:50:06 PDT 2015
Hi again, Thomas
I used this line
filter.value = filter.value.replace(/\*/g, '!*');
because I want a filter like this:
var filter = new OpenLayers.Filter.Comparison({
property: 'STATE_NAME',
type: '~',
value: '*'
});
to match ALL the state names.
But, you are right, it is not necessary for the "singleChar" --> "." example
that I want to make work.
---
About what you said, that you messed around with RegExp and it worked. Did
you try to use the singleChar "."?
For example, I want all the states which name has 5 letters. So, I use 5
times the singleChar, which supposedly matches *any single character*.
I may be wrong, but I don't know why. Do you think "." does not represent
the singleChar?
Look t the example, please. In green stroke you see the same layer but in
WMS. The style (SLD Body) here works fine. It matches the states: Idaho,
Texas and Maine. The y are the only ones with 5 letters.
But, in the vector layer, which uses an OpenLayers.StyleMap, it shows all
the states with 5 or more letters. But the filter used in the rule of the
style is *exactly the same*.
I don't understand this.
Thanks for your help.
João
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Like-query-with-singleChar-does-not-work-correctly-in-OpenLayers-StyleMap-tp5203061p5203183.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list