108 | | It looks as if the TEXT value is an expression (and it is stored as such) but it's not evaluated as one. It would be very useful to treat this as a true expression. This would open up a world of formatting options for drivers that don't support it otherwise (e.g. shapefiles). Ticket [http://trac.osgeo.org/mapserver/ticket/2950:2950] |
| 108 | It looks as if the TEXT value is an expression (and it is stored as such) but it's not evaluated as one. It would be very useful to treat this as a true expression. This would open up a world of formatting options for drivers that don't support it otherwise (e.g. shapefiles). Ticket [http://trac.osgeo.org/mapserver/ticket/2950 2950] is an example where this would come in handy. Within the sandbox I've added ''toString'', ''round'' and ''commify'' functions so that you can write: |
| 109 | |
| 110 | {{{ |
| 111 | TEXT (commify(toString([area]*0.000247105381,"%.2f")) + ' ac') |
| 112 | }}} |
| 113 | |
| 114 | Which converts area from sq. meters to acres, truncates the result to two decimal places adds commas (213234.123455 => 213,234.12) for crowd pleasing display. |
| 115 | |