Skip to content

Commit

Permalink
fix: 🎨 remove name rendering, and fix other feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tjur0 committed Aug 29, 2022
1 parent dd83871 commit 590991d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 55 deletions.
1 change: 1 addition & 0 deletions openstreetmap-carto.style
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ node,way railway text linear
node,way ref text linear
node,way religion text linear
way route text linear
way roller_coaster text linear
way service text linear
node,way shop text polygon
way surface text linear
Expand Down
21 changes: 3 additions & 18 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ Layer:
way
FROM planet_osm_line
WHERE highway = 'bus_guideway'
) AS guideways
) AS guideways
properties:
minzoom: 11
- id: roller-coaster
Expand All @@ -1014,13 +1014,14 @@ Layer:
(SELECT
way,
roller_coaster,
railway,
CASE WHEN (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes') THEN 'yes' ELSE 'no' END AS tunnel
FROM planet_osm_line
ORDER BY
COALESCE(layer, 0) -- put bottom layered track first
) AS roller_coaster
properties:
minzoom: 11
minzoom: 14
- id: entrances
geometry: point
<<: *extents
Expand Down Expand Up @@ -1966,22 +1967,6 @@ Layer:
) AS railways_text_name
properties:
minzoom: 11
- id: roller-coaster-text-name
geometry: linestring
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
roller_coaster,
name
FROM planet_osm_line
ORDER BY
COALESCE(layer, 0) DESC -- put top layered track first
) AS roller_coaster_text_name
properties:
minzoom: 11
- id: roads-text-ref-minor
geometry: linestring
<<: *extents
Expand Down
57 changes: 20 additions & 37 deletions style/roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -3521,15 +3521,24 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}

#roller-coaster {
[roller_coaster = 'track'] {
[zoom >= 15] {
line-width: 2;
[roller_coaster = 'track'][railway = null] {
[zoom >= 14] {
line-width: 1;
line-color: #707070;
line-join: round;
b/line-width: 1;
b/line-width: 0.5;
b/line-color: @road-fill;
b/line-dasharray: 0,0.2,1,0.2;
b/line-dasharray: 0,0.1,0.5,0.1;
b/line-join: round;
[tunnel = 'yes'] {
line-color: lighten(#707070, 20%);
b/line-color: lighten(@road-fill, 5%);
}
}
[zoom >= 15] {
line-width: 2;
b/line-width: 1;
b/line-dasharray: 0,0.2,1,0.2;
}
[zoom >= 16] {
line-width: 3;
Expand All @@ -3547,18 +3556,14 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
b/line-dasharray: 0,0.6,6,0.6;
}
[zoom >= 19] {
line-width: 7.5;
b/line-width: 3.75;
b/line-dasharray: 0,0.75,7.5,0.75;
line-width: 8;
b/line-width: 4;
b/line-dasharray: 0,0.8,8,0.8;
}
[zoom >= 20] {
line-width: 10;
b/line-width: 5;
b/line-dasharray: 0,1,10,1;
}
[tunnel = 'yes'] {
line-color: lighten(#707070, 10%);
b/line-color: lighten(@road-fill, 5%);
line-width: 12;
b/line-width: 6;
b/line-dasharray: 0,1.2,12,1.2;
}
}
}
Expand Down Expand Up @@ -4249,25 +4254,3 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}
}
}

#roller-coaster-text-name {
[roller_coaster = 'track'] {
[zoom >= 17] {
text-name: "[name]";
text-fill: #666666;
text-size: 10;
text-dy: 6;
text-spacing: 900;
text-clip: false;
text-placement: line;
text-face-name: @book-fonts;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
text-repeat-distance: @railway-text-repeat-distance;
}
[zoom >= 19] {
text-size: 11;
text-dy: 7;
}
}
}

0 comments on commit 590991d

Please sign in to comment.