Uploaded image for project: 'GeoServer'
  1. GEOS-8481

CSS attributes with expression and unit strings not working

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.12.2
    • Component/s: CSS
    • Labels:
      None
    • Environment:

      Geoserver 2.12.1
      Tomcat 7

      Description

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

      /* @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:

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

      Tested against topp:states seems to work.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                aaime Andrea Aime
                Reporter:
                google Michel W
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: