mapbox / carto

fast CSS-like map stylesheets
https://cartocss.readthedocs.io/
Apache License 2.0
652 stars 129 forks source link

Numerical selector unexpectedly ignored #370

Closed matthijsmelissen closed 8 years ago

matthijsmelissen commented 10 years ago

Consider the following Carto code:

[way_pixels < 192000][way_pixels > 3000] { 
  line-width: 1;
}

Carto translates this to the following filter:

<Filter>([way_pixels] &gt; 3000)</Filter>

I would expect the following filter instead:

<Filter>([way_pixels] &lt; 192000) and ([way_pixels] &gt; 3000)</Filter>

Reversing the quantifiers, or replacing < by <=, does give the expected output.

springmeyer commented 9 years ago

@math1985 - I think this is fixed in this pull: https://github.com/mapbox/carto/pull/393. Can you give it a try and let me know. /cc @gravitystorm @pnorman

matthijsmelissen commented 9 years ago

Thanks! Not tested yet, but code looks good.

matthijsmelissen commented 9 years ago

369 is independent from this, right?