Skip to content
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

Nicer ferry styling #775

Merged
merged 9 commits into from
Feb 17, 2023
15 changes: 13 additions & 2 deletions src/layer/ferry.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@ import * as Color from "../constants/color.js";
// Filter properties in this layer should be updated to reflect consensus once
// https://github.com/openmaptiles/openmaptiles/issues/1373 is closed

//Exponent base for inter-zoom interpolation
const ferryExp = 1.2; // same as for roads

export const ferry = {
id: "ferry",
type: "line",
paint: {
"line-color": Color.waterLineBold,
"line-dasharray": [7, 5],
"line-width": 1.5,
"line-width": [
"interpolate",
["exponential", ferryExp],
["zoom"],
4,
0.55, // make slightlier thicker than roads at this scale since ferry colors are lower contrast
12,
1,
],
},
filter: [
"any",
Expand All @@ -27,7 +38,7 @@ export const ferry = {

export const legendEntries = [
{
description: "Ferry line",
description: "Ferry route",
layers: [ferry.id],
},
];