We're updating the issue view to help you get more done. 

CSS attributes with expression and unit strings not working

Description

Styling a line vector according to an attribute value (eg. here ac_average) is not working. E.g:

1 2 3 4 5 /* @title red line */ * { stroke: #ff3300; stroke-width: [ 0.00001m * ac_average]; }

The m for meter seems to cause problems, as it works without the m and just 1000m (no expression) also works. What am I missing? The documentation explains that this should work: "When using expressions in place of numeric values, the first unit listed for the type of measure is assumed."

In the meantime Andrea provides the following workaround work around:

1 2 3 4 5 /* @title red line */ * { stroke: #ff3300; stroke-width: [Concatenate(0.001 * PERSONS, 'm')]; }

Tested against topp:states seems to work.

Environment

Geoserver 2.12.1
Tomcat 7

Status

Assignee

Andrea Aime

Reporter

Michel W

Triage

Fix versions

Affects versions

None

Components

Priority

Low