Skip to content

Commit

Permalink
Show lines in different colors (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianruesch authored Jan 26, 2023
1 parent 2976a9d commit 8fae3fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/client/src/components/infrastructure/mapStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ export const infrastructureMapStyle = (() => {
'source-layer': 'rail',
'filter': ['==', 'rail', 'primary'],
'paint': {
'line-color': '#444',
'line-color': [
'case',
['has', 'color'], ['get', 'color'],
'#444'
],
'line-width': 2.0
}
},
Expand Down
1 change: 1 addition & 0 deletions web/server/profile/profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function process_way(way)
way:set_target_layer("rail")
way:set_approved_min(5)
way:add_string("rail", "primary")
way:add_tag_as_string("color")
end

elseif way:has_any_tag("waterway") then
Expand Down

0 comments on commit 8fae3fa

Please sign in to comment.