mapping dom
mapping dom

Reputation: 1955

Combine zoom level selector with others in Tilemill CSS

What i'd like to do is, select all the roads that are type motoroway between zoom levels then define how they style for each zoom level within that range. Which led me to;

#roads[type=‘motorway’][zoom>=12][zoom<=17]

but it throws a invalid code error, i've checked my attributes and the column header is type and motorway is the entry. Is it not possible to filter a style using this combination.

I know there are other ways to achieve this result. Such as

#roads[zoom>=12][zoom<=17]{
line-color: @road;
[zoom=12]{
[type='motorway'],[type='motorway_link']{ line-width: 10; }

But this seems inefficient as i'd have multiple blocks of code for each road type.

Or i could split my layers up into major and minor roads but again seems like there should be a smarter solution.

Upvotes: 0

Views: 84

Answers (0)

Related Questions