-
Notifications
You must be signed in to change notification settings - Fork 9
Tunnels are too prominent #48
Comments
The problem is that I have absolutely no idea how to show only the outline but not the whole tunnel because the tunnel will always be drawn by default... |
Draw it with 100% transparency? |
Don't use the "opaque" (default) draw mode for translucent stuff. Try |
How about other blend modes? |
The same result... |
There is not even a visible effect when switching the modes... |
Alright. |
Okay, the goal is to make the line fill of tunnels half-transparent or even fully-transparent+preserving the line outline. I also had a go but did not succeed. I think why the translucent blend mode does not seem to work on tunnels is because the parent rule already defines a (white) color for the road. The half-transparent white of tunnels then just adds to the white of the road. I tried to not define the road color in the parent draw rule (for
(to achieve the line for tunnels not being filled but just the outline drawn) Adding
does draw tunnels (for testing: pink), but not translucent but opaque. @matteblair, do you know what I am doing wrong? My goal is to draw tunnels with a (half-)transparent fill (while keeping the outline at full opaqueness, if possible). Though, I am failing to draw the tunnels half-transparent in the first place. |
I think what's going to work best here is a styles:
tunnel-style:
base: lines
blend: translucent Paired with draw rules that set a low (or zero) fill opacity and a high outline opacity: layers:
roads:
data: { source: nextzen}
filter: { not: { kind: [rail, ferry] } }
tunnel:
filter: {is_tunnel: true }
draw:
lines:
style: tunnel-style
color: [0., 1., 0., 0.1]
width: 7px
order: 6
outline:
color: [.8, .8, .8, 1.]
width: 3px Let me know if that looks better! |
Oh right, I tried your suggestion, and it looks pretty good now. I think what I did wrong was to write
instead of
Thank you, @matteblair ! |
Tunnels are too prominent, too solid.
Only the outline of the tunnel should be shown half-transparent and dashed, but the line should not be filled - or if filled, with something along the lines like 90% transparency.
Also, the outlines of normal roads and those of tunnels are merged, this looks quite weird.
The text was updated successfully, but these errors were encountered: