Skip to content

Commit

Permalink
Merge pull request #476 from ZeLonewolf/clay-rail
Browse files Browse the repository at this point in the history
Add railroad tracks
  • Loading branch information
claysmalley authored Aug 1, 2022
2 parents 6a945d5 + d93c685 commit 3d65b9e
Show file tree
Hide file tree
Showing 4 changed files with 582 additions and 0 deletions.
77 changes: 77 additions & 0 deletions scripts/taginfo_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,83 @@
"object_types": ["way"],
"description": "Major roads under construction have a dotted line pattern and a more prominent color.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "rail",
"object_types": ["way"],
"description": "Conventional railroads are represented by a thick light gray line with a sparse tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "narrow_gauge",
"object_types": ["way"],
"description": "Narrow gauge railroads are represented by a thick light gray line with a sparse doubled tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "subway",
"object_types": ["way"],
"description": "Subways are represented by a thick dark gray line with no tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "monorail",
"object_types": ["way"],
"description": "Monorails are represented by a thin dark gray line with no tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "light_rail",
"object_types": ["way"],
"description": "Light rail is represented by a thin dark gray line with a dense tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "tram",
"object_types": ["way"],
"description": "Trams are represented by a thin light gray line with a dense tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "funicular",
"object_types": ["way"],
"description": "Funiculars are represented by a thin dark gray line with a very dense tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "service",
"value": "crossover",
"object_types": ["way"],
"description": "Displays railroads with normal line width but ties removed.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "service",
"value": "siding",
"object_types": ["way"],
"description": "Displays railroads with a thinner line width but normal tie spacing.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "service",
"value": "spur",
"object_types": ["way"],
"description": "Displays railroads with a thinner line width but normal tie spacing.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "service",
"value": "yard",
"object_types": ["way"],
"description": "Displays railroads with a thinner line width but normal tie spacing.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
}
]
}
42 changes: 42 additions & 0 deletions src/americana.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import * as lyrHighwayShield from "./layer/highway_shield.js";
import * as lyrOneway from "./layer/oneway.js";
import * as lyrPark from "./layer/park.js";
import * as lyrPlace from "./layer/place.js";
import * as lyrRail from "./layer/rail.js";
import * as lyrRoad from "./layer/road.js";
import * as lyrTransportationLabel from "./layer/transportation_label.js";
import * as lyrWater from "./layer/water.js";
Expand Down Expand Up @@ -59,6 +60,19 @@ americanaLayers.push(
lyrBackground.pierArea,
lyrBackground.pierLine,

lyrRail.railTunnel.dashes(),
lyrRail.railServiceTunnel.dashes(),

lyrRail.narrowGaugeTunnel.dashes(),
lyrRail.narrowGaugeServiceTunnel.dashes(),

lyrRail.lightRailTramTunnel.dashes(),
lyrRail.lightRailTramServiceTunnel.dashes(),

lyrRail.funicularTunnel.dashes(),

lyrRail.railwayTunnel.fill(),

lyrConstruction.road,

lyrRoad.motorwayLinkTunnel.casing(),
Expand Down Expand Up @@ -222,13 +236,28 @@ americanaLayers.push(
lyrRoad.secondaryToll.surface(),
lyrRoad.primaryToll.surface(),

lyrRail.rail.dashes(),
lyrRail.railService.dashes(),

lyrRail.narrowGauge.dashes(),
lyrRail.narrowGaugeService.dashes(),

lyrRail.lightRailTram.dashes(),
lyrRail.lightRailTramService.dashes(),

lyrRail.funicular.dashes(),

lyrRail.railway.fill(),

lyrOneway.road,
lyrOneway.link
);

americanaLayers.push(lyrBuilding.building);

var bridgeLayers = [
lyrRail.bridgeCasing,

lyrRoad.tertiaryLinkBridge.casing(),
lyrRoad.secondaryLinkBridge.casing(),
lyrRoad.primaryLinkBridge.casing(),
Expand Down Expand Up @@ -310,6 +339,19 @@ var bridgeLayers = [
lyrRoad.secondaryTollBridge.surface(),
lyrRoad.primaryTollBridge.surface(),

lyrRail.railBridge.dashes(),
lyrRail.railServiceBridge.dashes(),

lyrRail.narrowGaugeBridge.dashes(),
lyrRail.narrowGaugeServiceBridge.dashes(),

lyrRail.lightRailTramBridge.dashes(),
lyrRail.lightRailTramServiceBridge.dashes(),

lyrRail.funicularBridge.dashes(),

lyrRail.railwayBridge.fill(),

lyrOneway.bridge,
lyrOneway.bridgeLink,
];
Expand Down
10 changes: 10 additions & 0 deletions src/constants/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ export const shields = {
yellow: "#ffcd00", // Pantone 116
yellow_green: "#c4d600", // Pantone 382
};

export const railwayTunnelFill = "hsl(0, 0%, 90%)";

export const railFill = "hsl(0, 0%, 60%)";
export const narrowGaugeFill = "hsl(0, 0%, 60%)";
export const subwayFill = "hsl(0, 0%, 50%)";
export const lightRailFill = "hsl(0, 0%, 50%)";
export const tramFill = "hsl(0, 0%, 60%)";
export const monorailFill = "hsl(0, 0%, 50%)";
export const funicularFill = "hsl(0, 0%, 50%)";
Loading

0 comments on commit 3d65b9e

Please sign in to comment.