Skip to content

Commit

Permalink
uniform zoom from 17 onwards
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Mar 8, 2024
1 parent dbc43c4 commit a6d1763
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fun main(args: Array<String>) {

fun createStyle(name: String, accessToken: String, languages: List<String>, colors: Colors): String {

val pathWidth = listOf(14 to 0.5, 24 to 384.0) // ~1m
val pathWidth = listOf(14 to 0.5, 17 to 3.0, 24 to 384.0) // ~1m

fun coalesceName() =
"[" +
Expand Down Expand Up @@ -138,14 +138,14 @@ fun createStyle(name: String, accessToken: String, languages: List<String>, colo
filters = listOf(tagIs("kind", "pedestrian")),
color = colors.pedestrian,
colorOutline = colors.roadOutline,
width = listOf(13 to 1.5, 24 to 1024.0), // ~6m
width = listOf(13 to 1.5, 17 to 8.0, 24 to 1024.0), // ~6m
minZoom = 14.0
)
val serviceRoads = Road("roads-service",
filters = listOf(tagIn("kind", "service", "track", "busway")),
color = colors.road,
colorOutline = colors.roadOutline,
width = listOf(13 to 0.5, 24 to 768.0), // ~4m
width = listOf(13 to 0.5, 17 to 6.0, 24 to 768.0), // ~4m
minZoom = 14.0
)
val minorRoads = Road("roads-minor",
Expand All @@ -162,7 +162,7 @@ fun createStyle(name: String, accessToken: String, languages: List<String>, colo
),
color = colors.road,
colorOutline = colors.roadOutline,
width = listOf(11 to 0.5, 13 to 1.5, 24 to 1024.0), // ~6m
width = listOf(11 to 0.5, 17 to 8.0, 24 to 1024.0), // ~6m
minZoom = 12.0
)
val majorRoads = Road("roads-major",
Expand All @@ -172,21 +172,21 @@ fun createStyle(name: String, accessToken: String, languages: List<String>, colo
),
color = colors.road,
colorOutline = colors.roadOutline,
width = listOf(9 to 1.0, 13 to 4.5, 24 to 1536.0), // ~8m
width = listOf(9 to 1.0, 17 to 12.0, 24 to 1536.0), // ~8m
minZoom = 5.0,
)
val motorways = Road("motorways",
filters = listOf(tagIs("kind", "motorway"), tagIsNot("link", true)),
color = colors.motorway,
colorOutline = colors.motorwayOutline,
width = listOf(8 to 1.0, 13 to 8.0, 24 to 2048.0), // ~12m
width = listOf(8 to 1.0, 17 to 16.0, 24 to 2048.0), // ~12m
minZoom = 5.0,
)
val motorwayLinks = Road("motorway-links",
filters = listOf(tagIs("kind", "motorway"), tagIs("link", true)),
color = colors.motorway,
colorOutline = colors.motorwayOutline,
width = listOf(11 to 1.0, 13 to 1.5, 24 to 1024.0), // ~6m
width = listOf(11 to 1.0, 17 to 8.0, 24 to 1024.0), // ~6m
)
val aeroways = Road("aeroways",
filters = listOf(tagIn("kind", "runway", "taxiway")),
Expand Down

0 comments on commit a6d1763

Please sign in to comment.