Skip to content

Commit

Permalink
reorder tunnel casing rendering for better connection between tunnel/…
Browse files Browse the repository at this point in the history
…non-tunnel lines
  • Loading branch information
hiddewie committed Oct 20, 2024
1 parent 3bb9ebb commit fc03530
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions proxy/js/styles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1213,55 +1213,6 @@ const layers = {
'line-gap-width': railway_tunnel_casing_add,
}
},
{
id: 'railway_tunnel_fill',
type: 'line',
minzoom: 8,
source: 'high',
'source-layer': 'railway_line_high',
filter: ['all',
['get', 'tunnel'],
['!=', ['get', 'railway'], 'construction'],
['!=', ['get', 'railway'], 'proposed'],
['!=', ['get', 'railway'], 'abandoned'],
['!=', ['get', 'railway'], 'razed'],
],
layout: {
'line-join': 'round',
'line-cap': 'round',
},
paint: standardFillPaint([1]),
},
{
id: 'railway_tunnel_bright',
type: 'line',
minzoom: 8,
source: 'high',
'source-layer': 'railway_line_high',
filter: ['all',
['get', 'tunnel'],
['!=', ['get', 'railway'], 'construction'],
['!=', ['get', 'railway'], 'proposed'],
['!=', ['get', 'railway'], 'abandoned'],
['!=', ['get', 'railway'], 'razed'],
],
layout: {
'line-join': 'round',
'line-cap': 'round',
},
paint: {
...standardFillPaint([1]),
'line-color': 'rgba(255, 255, 255, 50%)',
}
},
preferredDirectionLayer('railway_tunnel_preferred_direction', ['all',
['get', 'tunnel'],
['any',
['==', ['get', 'preferred_direction'], 'forward'],
['==', ['get', 'preferred_direction'], 'backward'],
['==', ['get', 'preferred_direction'], 'both'],
]
]),
{
id: 'railway_line_casing',
type: 'line',
Expand Down Expand Up @@ -1358,6 +1309,55 @@ const layers = {
'line-dasharray': razed_dasharray,
}
},
{
id: 'railway_tunnel_fill',
type: 'line',
minzoom: 8,
source: 'high',
'source-layer': 'railway_line_high',
filter: ['all',
['get', 'tunnel'],
['!=', ['get', 'railway'], 'construction'],
['!=', ['get', 'railway'], 'proposed'],
['!=', ['get', 'railway'], 'abandoned'],
['!=', ['get', 'railway'], 'razed'],
],
layout: {
'line-join': 'round',
'line-cap': 'round',
},
paint: standardFillPaint([1]),
},
{
id: 'railway_tunnel_bright',
type: 'line',
minzoom: 8,
source: 'high',
'source-layer': 'railway_line_high',
filter: ['all',
['get', 'tunnel'],
['!=', ['get', 'railway'], 'construction'],
['!=', ['get', 'railway'], 'proposed'],
['!=', ['get', 'railway'], 'abandoned'],
['!=', ['get', 'railway'], 'razed'],
],
layout: {
'line-join': 'round',
'line-cap': 'round',
},
paint: {
...standardFillPaint([1]),
'line-color': 'rgba(255, 255, 255, 50%)',
}
},
preferredDirectionLayer('railway_tunnel_preferred_direction', ['all',
['get', 'tunnel'],
['any',
['==', ['get', 'preferred_direction'], 'forward'],
['==', ['get', 'preferred_direction'], 'backward'],
['==', ['get', 'preferred_direction'], 'both'],
]
]),
{
id: 'railway_construction_fill',
type: 'line',
Expand Down

0 comments on commit fc03530

Please sign in to comment.