[Mapserver-users] Annotation setExpression() problem

Daniel Morissette dmorissette at dmsolutions.ca
Mon Feb 16 11:34:01 PST 2004


Rene Teniere wrote:
> 
> I added the parentheses, but it didn't work, and I put it exactly the
> way it was written in the variable in the mapfile: EXPRESSION
> /1699|1804/ and that worked! The problem is that the expression is being
> changed, but doesn't seem to be applied to the layer itself. I checked
> this through the getExpression(), whereby I printed out the initial
> expression (the one that's in the mapfile ([TRTAREA]>0)), then set the
> new expression and printed that one out. The formats should be
> acceptable. Ex: If I initially set the mapfile expression to: EXPRESSION
> /1699|1700/ then through getExpression(), /1699|1700/ is printed off.
> When I use setExpression($sExp) whereby $sExp = "/1699|1700/",
> /1699|1700/ is printed off as well. The difference is that the first one
> works (I only get poly's 1699 and 1700 displayed), while the other
> method does not work at all. If the initial expression is different than
> the one set in PHP, the original mapfile expression is used. Man I hope
> this makes sense to someone :(
> 

Maybe you should file a bug?  Also specify in the bug your version of 
MapServer and if possible include a small test case to reproduce the issue.

We do use setExpression() without problems I'm almost sure, so you may 
have run into a specific problem with your mapfile/data.  OR maybe there 
is a bug specific to passing a regex to setExpression().

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the MapServer-users mailing list