-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #512 from ZeLonewolf/clay-oneway
Add oneway arrows to remaining highway classes
- Loading branch information
Showing
6 changed files
with
59 additions
and
255 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,285 +1,91 @@ | ||
"use strict"; | ||
|
||
export const road = { | ||
id: "road_oneway", | ||
type: "symbol", | ||
paint: { | ||
"icon-opacity": 0.5, | ||
}, | ||
// Common expressions | ||
const highwaySelector = ["match", ["get", "class"]]; | ||
|
||
export const surface = { | ||
id: "oneway_surface", | ||
filter: [ | ||
"all", | ||
["==", ["get", "oneway"], 1], | ||
["!", ["in", ["get", "brunnel"], ["literal", ["bridge", "tunnel"]]]], | ||
["!=", ["get", "ramp"], 1], | ||
[ | ||
"in", | ||
["get", "class"], | ||
[ | ||
"literal", | ||
[ | ||
"motorway", | ||
// "trunk", | ||
// "primary", | ||
// "secondary", | ||
// "tertiary", | ||
// "minor", | ||
// "service", | ||
], | ||
], | ||
], | ||
["!", ["in", ["get", "brunnel"], ["literal", ["bridge", "tunnel"]]]], | ||
], | ||
layout: { | ||
"icon-size": { | ||
stops: [ | ||
[15, 0.5], | ||
[19, 1], | ||
], | ||
}, | ||
"icon-image": "oneway", | ||
visibility: "visible", | ||
"icon-padding": 2, | ||
"symbol-spacing": 75, | ||
"symbol-placement": "line", | ||
"icon-rotation-alignment": "map", | ||
}, | ||
source: "openmaptiles", | ||
minzoom: 15, | ||
"source-layer": "transportation", | ||
}; | ||
|
||
export const tunnel = { | ||
id: "tunnel_oneway", | ||
type: "symbol", | ||
paint: { | ||
"icon-opacity": 0.5, | ||
}, | ||
filter: [ | ||
"all", | ||
["==", ["get", "oneway"], 1], | ||
["==", ["get", "brunnel"], "tunnel"], | ||
["!=", ["get", "ramp"], 1], | ||
[ | ||
"in", | ||
["get", "class"], | ||
[ | ||
"literal", | ||
[ | ||
"motorway", | ||
// "trunk", | ||
// "primary", | ||
// "secondary", | ||
// "tertiary", | ||
// "minor", | ||
// "service", | ||
], | ||
], | ||
], | ||
], | ||
layout: { | ||
"icon-size": { | ||
stops: [ | ||
[15, 0.5], | ||
[19, 1], | ||
], | ||
}, | ||
"icon-image": "oneway", | ||
visibility: "visible", | ||
//"icon-rotate": 90, | ||
"icon-padding": 2, | ||
"symbol-spacing": 75, | ||
"symbol-placement": "line", | ||
"icon-rotation-alignment": "map", | ||
}, | ||
source: "openmaptiles", | ||
minzoom: 15, | ||
"source-layer": "transportation", | ||
}; | ||
|
||
export const bridge = { | ||
id: "bridge_oneway", | ||
type: "symbol", | ||
paint: { | ||
"icon-opacity": 0.5, | ||
}, | ||
filter: [ | ||
"all", | ||
["==", ["get", "oneway"], 1], | ||
["==", ["get", "brunnel"], "bridge"], | ||
["!=", ["get", "ramp"], 1], | ||
[ | ||
"in", | ||
["get", "class"], | ||
layout: { | ||
"icon-size": [ | ||
"interpolate", | ||
["exponential", 1.2], | ||
["zoom"], | ||
15, | ||
[...highwaySelector, ["motorway", "trunk", "primary"], 0.5, 0.3], | ||
19, | ||
[ | ||
"literal", | ||
[ | ||
"motorway", | ||
// "trunk", | ||
// "primary", | ||
// "secondary", | ||
// "tertiary", | ||
// "minor", | ||
// "service", | ||
], | ||
...highwaySelector, | ||
["motorway", "trunk", "primary"], | ||
1, | ||
"secondary", | ||
0.8, | ||
0.6, | ||
], | ||
], | ||
], | ||
layout: { | ||
"icon-size": { | ||
stops: [ | ||
[15, 0.5], | ||
[19, 1], | ||
], | ||
}, | ||
"icon-image": "oneway", | ||
visibility: "visible", | ||
"icon-padding": 2, | ||
"symbol-spacing": 75, | ||
"symbol-placement": "line", | ||
"icon-rotation-alignment": "map", | ||
}, | ||
source: "openmaptiles", | ||
minzoom: 15, | ||
"source-layer": "transportation", | ||
}; | ||
|
||
export const link = { | ||
id: "road_oneway_link", | ||
type: "symbol", | ||
paint: { | ||
"icon-opacity": 0.5, | ||
}, | ||
filter: [ | ||
"all", | ||
["==", ["get", "oneway"], 1], | ||
["!", ["in", ["get", "brunnel"], ["literal", ["bridge", "tunnel"]]]], | ||
["==", ["get", "ramp"], 1], | ||
[ | ||
"in", | ||
["get", "class"], | ||
"icon-image": [ | ||
"match", | ||
["get", "brunnel"], | ||
"tunnel", | ||
"oneway_black", | ||
[ | ||
"literal", | ||
[ | ||
"motorway", | ||
// "trunk", | ||
// "primary", | ||
// "secondary", | ||
// "tertiary", | ||
// "minor", | ||
// "service", | ||
], | ||
"match", | ||
["get", "toll"], | ||
1, | ||
"oneway_black", | ||
[...highwaySelector, "motorway", "oneway_white", "oneway_black"], | ||
], | ||
], | ||
], | ||
layout: { | ||
"icon-size": { | ||
stops: [ | ||
[15, 0.3], | ||
[19, 0.8], | ||
], | ||
}, | ||
"icon-image": "oneway", | ||
visibility: "visible", | ||
"icon-padding": 2, | ||
"symbol-spacing": 75, | ||
"symbol-spacing": [ | ||
"interpolate", | ||
["exponential", 1.2], | ||
["zoom"], | ||
15, | ||
75, | ||
19, | ||
300, | ||
], | ||
"symbol-placement": "line", | ||
"icon-rotation-alignment": "map", | ||
}, | ||
source: "openmaptiles", | ||
minzoom: 16, | ||
"source-layer": "transportation", | ||
}; | ||
|
||
export const tunnelLink = { | ||
id: "tunnel_oneway_link", | ||
type: "symbol", | ||
paint: { | ||
"icon-opacity": 0.5, | ||
}, | ||
}; | ||
|
||
export const tunnel = { | ||
...surface, | ||
id: "oneway_tunnel", | ||
filter: [ | ||
"all", | ||
["==", ["get", "oneway"], 1], | ||
["!=", ["get", "ramp"], 1], | ||
["==", ["get", "brunnel"], "tunnel"], | ||
["==", ["get", "ramp"], 1], | ||
[ | ||
"in", | ||
["get", "class"], | ||
[ | ||
"literal", | ||
[ | ||
"motorway", | ||
// "trunk", | ||
// "primary", | ||
// "secondary", | ||
// "tertiary", | ||
// "minor", | ||
// "service", | ||
], | ||
], | ||
], | ||
], | ||
layout: { | ||
"icon-size": { | ||
stops: [ | ||
[15, 0.3], | ||
[19, 0.8], | ||
], | ||
}, | ||
"icon-image": "oneway", | ||
visibility: "visible", | ||
//"icon-rotate": 90, | ||
"icon-padding": 2, | ||
"symbol-spacing": 75, | ||
"symbol-placement": "line", | ||
"icon-rotation-alignment": "map", | ||
paint: { | ||
"icon-opacity": 0.2, | ||
}, | ||
source: "openmaptiles", | ||
minzoom: 16, | ||
"source-layer": "transportation", | ||
}; | ||
|
||
export const bridgeLink = { | ||
id: "bridge_oneway_link", | ||
type: "symbol", | ||
paint: { | ||
"icon-opacity": 0.5, | ||
}, | ||
export const bridge = { | ||
...surface, | ||
id: "oneway_bridge", | ||
filter: [ | ||
"all", | ||
["==", ["get", "oneway"], 1], | ||
["!=", ["get", "ramp"], 1], | ||
["==", ["get", "brunnel"], "bridge"], | ||
["==", ["get", "ramp"], 1], | ||
[ | ||
"in", | ||
["get", "class"], | ||
[ | ||
"literal", | ||
[ | ||
"motorway", | ||
// "trunk", | ||
// "primary", | ||
// "secondary", | ||
// "tertiary", | ||
// "minor", | ||
// "service", | ||
], | ||
], | ||
], | ||
], | ||
layout: { | ||
"icon-size": { | ||
stops: [ | ||
[15, 0.3], | ||
[19, 0.8], | ||
], | ||
}, | ||
"icon-image": "oneway", | ||
visibility: "visible", | ||
"icon-padding": 2, | ||
"symbol-spacing": 75, | ||
"symbol-placement": "line", | ||
"icon-rotation-alignment": "map", | ||
}, | ||
source: "openmaptiles", | ||
minzoom: 16, | ||
"source-layer": "transportation", | ||
}; |
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