-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add aerialways #755
Merged
Merged
add aerialways #755
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7c6d975
add aerialways
claysmalley 7242b75
adjust aerialway width
claysmalley 3082252
rename aerialway legend header
claysmalley 641c94d
Merge branch 'main' into clay-aerialway
claysmalley 4ba0823
Merge branch 'main' into clay-aerialway
claysmalley f5ab26b
change aerialways to purple and move drag lifts below bridges
claysmalley d627995
Merge branch 'main' into clay-aerialway
claysmalley 25fdea5
remove casing from drag lifts
claysmalley d3762bc
bigger aerialway gap width on high zooms
claysmalley 7b7ca1f
add taginfo for aerialways
claysmalley de90897
thinner drag lift line
claysmalley 0a0758f
Merge branch 'main' into clay-aerialway
claysmalley 5d4bcb0
transition aerialways at z15 from single to double line
claysmalley 261695c
move drag lift out of bridge layers
claysmalley 3db148d
Merge branch 'main' into clay-aerialway
claysmalley e782544
Merge branch 'main' into clay-aerialway
claysmalley c0f3513
Merge branch 'main' into clay-aerialway
claysmalley 1420123
Merge branch 'main' into clay-aerialway
ZeLonewolf 71b2cc5
add aerialway text offset
claysmalley ff112a7
Merge branch 'main' into clay-aerialway
claysmalley 5b21586
negate text offset
claysmalley c14f467
change aerialways to magenta
claysmalley 81a41fc
change aerialway text-anchor to center
claysmalley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
"use strict"; | ||
|
||
import * as Color from "../constants/color.js"; | ||
|
||
// Exponent base for inter-zoom interpolation | ||
let aerialwayExp = 1.2; | ||
|
||
let lineWidth = [ | ||
"interpolate", | ||
["exponential", aerialwayExp], | ||
["zoom"], | ||
12, | ||
1.2, | ||
14.9999, | ||
2.4, | ||
15, | ||
1.2, | ||
16, | ||
1.2, | ||
20, | ||
2.4, | ||
]; | ||
let lineGapWidth = [ | ||
"interpolate", | ||
["exponential", aerialwayExp], | ||
["zoom"], | ||
12, | ||
0, | ||
15, | ||
0, | ||
16, | ||
1, | ||
20, | ||
16, | ||
]; | ||
|
||
let casingLineWidth = [ | ||
"interpolate", | ||
["exponential", aerialwayExp], | ||
["zoom"], | ||
12, | ||
2, | ||
15.9999, | ||
4, | ||
16, | ||
2, | ||
20, | ||
4, | ||
]; | ||
let casingLineGapWidth = [ | ||
"interpolate", | ||
["exponential", aerialwayExp], | ||
["zoom"], | ||
12, | ||
0, | ||
16, | ||
0, | ||
20, | ||
14.4, | ||
]; | ||
|
||
export const lift = { | ||
id: "lift", | ||
type: "line", | ||
paint: { | ||
"line-color": Color.aerialwayLine, | ||
"line-width": lineWidth, | ||
"line-gap-width": lineGapWidth, | ||
}, | ||
filter: [ | ||
"all", | ||
["==", ["get", "class"], "aerialway"], | ||
[ | ||
"in", | ||
["get", "subclass"], | ||
["literal", ["chair_lift", "cable_car", "gondola", "mixed_lift"]], | ||
], | ||
], | ||
layout: { | ||
visibility: "visible", | ||
}, | ||
source: "openmaptiles", | ||
"source-layer": "transportation", | ||
}; | ||
|
||
export const liftCasing = { | ||
id: "lift_casing", | ||
type: "line", | ||
paint: { | ||
"line-color": Color.backgroundFill, | ||
"line-width": casingLineWidth, | ||
"line-gap-width": casingLineGapWidth, | ||
}, | ||
filter: [ | ||
"all", | ||
["==", ["get", "class"], "aerialway"], | ||
[ | ||
"in", | ||
["get", "subclass"], | ||
["literal", ["chair_lift", "cable_car", "gondola", "mixed_lift"]], | ||
], | ||
], | ||
layout: { | ||
visibility: "visible", | ||
}, | ||
source: "openmaptiles", | ||
"source-layer": "transportation", | ||
}; | ||
|
||
export const dragLift = { | ||
id: "drag_lift", | ||
type: "line", | ||
paint: { | ||
"line-color": Color.aerialwayLine, | ||
"line-width": lineWidth, | ||
"line-gap-width": lineGapWidth, | ||
"line-dasharray": [5, 1], | ||
}, | ||
filter: [ | ||
"all", | ||
["==", ["get", "class"], "aerialway"], | ||
[ | ||
"in", | ||
["get", "subclass"], | ||
["literal", ["drag_lift", "platter", "j-bar", "t-bar"]], | ||
], | ||
], | ||
layout: { | ||
visibility: "visible", | ||
}, | ||
source: "openmaptiles", | ||
"source-layer": "transportation", | ||
}; | ||
|
||
export const legendEntries = [ | ||
{ | ||
description: "Aerial tramway or chairlift", | ||
layers: [lift.id], | ||
}, | ||
{ | ||
description: "Drag lift", | ||
layers: [dragLift.id], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The legend doesn’t correctly implement
line-gap-width
, making this legend entry look misleading: #770.