[OpenLayers-Users] CQL and spaces in string comparisons
emmexx
emmexx at tiscalinet.it
Sun Nov 6 18:35:28 EST 2011
I'm trying to use the CQL format to filter features in a vector layer.
The code I use is something like:
var format = new OpenLayers.Format.CQL();
var filter = format.read("myAttribute = 'value'");
Like that works.
If I try:
var filter = format.read("myAttribute = 'a value'"); //space between 'a'
and 'value'
it doesn't work:
Error: ERROR: In parsing: ['a value'], expected one of:
VALUE: /^('\w+'|\d+(\.\d*)?|\.\d+)/
http://localhost/OpenLayers-2.11/OpenLayers.js
Line 2718
I'm using OL 2.11
Thank you
maxx
More information about the Users
mailing list