Skip to content

Commit

Permalink
added waterway-name layer
Browse files Browse the repository at this point in the history
  • Loading branch information
smellman committed Aug 24, 2024
1 parent 5350bb5 commit 647494c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions layers.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ layers = new Listing {
import("layers/boundary-land-level-2.pkl")
import("layers/boundary-land-disputed.pkl")
import("layers/boundary-water.pkl")
import("layers/waterway-name.pkl")
}
6 changes: 5 additions & 1 deletion layers/variables.pkl
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
background_color = "#f8f4f0"
background_color = "#f8f4f0"
text_field = "{name:latin} {name:nonlatin}"
text_font {
"Noto Sans Italic"
}
33 changes: 33 additions & 0 deletions layers/waterway-name.pkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
extends "extends/waterway.pkl"
import "variables.pkl" as variables

id = "waterway-name"
type = "symbol"
minzoom = 13
filter {
"all"
new {
"=="
"$type"
"LineString"
}
new {
"has"
"name"
}
}
layout {
`symbol-placement` = "line"
`symbol-spacing` = 350
`text-field` = variables.text_field
`text-font` = variables.text_font
`text-letter-spacing` = 0.2
`text-max-width` = 5
`text-rotation-alignment` = "map"
`text-size` = 14
}
paint {
`text-color` = "#74aee9"
`text-halo-color` = "rgba(255,255,255,0.7)"
`text-halo-width` = 1.5
}

0 comments on commit 647494c

Please sign in to comment.