[mapserver-dev] getExpressionString issue

Jeff McKenna jmckenna at gatewaygeomatics.com
Thu Mar 24 07:06:42 PDT 2016


Hi David,

I have tested this locally using a string field that has values of "0.5 
- 1.0" the same as yours, and have setup a mapfile layer with an 
expression of: EXPRESSION "0.5 - 1.0"  I am able to correctly echo that 
expression through PHPmapscript's getExpressionString() such as:

   // open existing mapfile
   $oMap = ms_newMapObj("./getexpression.map");
   //get layer
   $oLayer = $oMap->getLayerByName("test");
   //get class
   $oClass = $oLayer->getClass(0);
   //get expression
   $expression =  $oClass->getExpressionString();

   echo $expression;


I am testing with MS4W 3.1.3 (MapServer 7.0.1).

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-03-24 8:23 AM, Donald wrote:
> Hello everyone,
>
> I have a mapfile with the folowing setup.
>
> CLASS
>        NAME "a7127d96d561327f30ee0e4d3d3bb43e"
>        EXPRESSION ('[reu]' = '0.5 - 1.0')
>        STYLE
>          COLOR 76 179 42
>          OUTLINECOLOR 76 179 42
>          SIZE 3
>        END # STYLE
>        TITLE "1525c/62c//0.5 - 1.0"
> END # CLASS
>
>   Whenever I call the method
> /$class->getExpressionString() /I get a string "05 - 10" instead of "0.5
> - 1.0". What should I do to solve this issue ?
>
> Thanks,
>
> David
> /
> /
>




More information about the mapserver-dev mailing list