From 3026ec5e3baa4a2fcc21fac4e2ac5138a18c024e Mon Sep 17 00:00:00 2001 From: naoki Date: Fri, 15 Jul 2022 13:13:30 +0900 Subject: [PATCH 1/3] add street name --- .../{railway-name.yml => road_name-minor.yml} | 21 +++++----- layers/road_name.yml | 40 +++++++++++++++++++ style.yml | 4 +- 3 files changed, 54 insertions(+), 11 deletions(-) rename layers/{railway-name.yml => road_name-minor.yml} (73%) create mode 100644 layers/road_name.yml diff --git a/layers/railway-name.yml b/layers/road_name-minor.yml similarity index 73% rename from layers/railway-name.yml rename to layers/road_name-minor.yml index 07e4bac..65aded5 100644 --- a/layers/railway-name.yml +++ b/layers/road_name-minor.yml @@ -1,4 +1,4 @@ -id: railway-name +id: road_name-minor type: symbol source: geolonia source-layer: transportation_name @@ -6,14 +6,17 @@ minzoom: 8 filter: - all - - '==' + - network + - road + - - in - class - - rail - - - '!in' - - brunnel - - tunnel - - - '!=' - - subclass - - subway + - minor + - service + - track + - path + # - - '!in' + # - brunnel + # - tunnel layout: text-font: - Noto Sans Universal Regular @@ -32,6 +35,6 @@ layout: - - 15 - 600 paint: - text-color: rgba(102, 102, 102, 1) + text-color: '#333333' text-halo-width: 1.2 text-halo-color: rgba(255,255,255,0.8) diff --git a/layers/road_name.yml b/layers/road_name.yml new file mode 100644 index 0000000..2012bea --- /dev/null +++ b/layers/road_name.yml @@ -0,0 +1,40 @@ +id: road_name +type: symbol +source: geolonia +source-layer: transportation_name +minzoom: 8 +filter: + - all + - - '==' + - network + - road + - - in + - class + - trunk + - primary + - secondary + - tertiary + # - - '!in' + # - brunnel + # - tunnel +layout: + text-font: + - Noto Sans Universal Regular + text-size: 12 + text-field: '{name}' + text-max-width: 8 + visibility: visible + symbol-placement: line + symbol-spacing: + base: 1000 + stops: + - - 10 + - 1000 + - - 12 + - 800 + - - 15 + - 600 +paint: + text-color: '#333333' + text-halo-width: 1.2 + text-halo-color: rgba(255,255,255,0.8) diff --git a/style.yml b/style.yml index 58eb3b1..d8ff4b8 100644 --- a/style.yml +++ b/style.yml @@ -137,8 +137,6 @@ layers: - !!inc/file layers/cablecar-dash.yml - !!inc/file layers/boundary-land-level-2.yml - !!inc/file layers/boundary-land-level-4.yml - - !!inc/file layers/railway-name.yml - # - !!inc/file layers/railway-subway-name.yml - !!inc/file layers/road_oneway.yml - !!inc/file layers/road_oneway_opposite.yml - !!inc/file layers/poi-worship.yml @@ -157,6 +155,8 @@ layers: - !!inc/file layers/road_shield_prefectural.yml - !!inc/file layers/road_shield_national.yml - !!inc/file layers/road_shield_highway.yml + - !!inc/file layers/road_name-minor.yml + - !!inc/file layers/road_name.yml - !!inc/file layers/nt-label-small.yml - !!inc/file layers/nt-label-large.yml - !!inc/file layers/place-island-name.yml From e5085c3ec21adde081f9db0b9f705fae18f8ff5c Mon Sep 17 00:00:00 2001 From: naoki Date: Fri, 15 Jul 2022 14:15:58 +0900 Subject: [PATCH 2/3] fix street name --- layers/highway-minor-casing.yml | 6 ++--- layers/highway-minor.yml | 14 ++++++----- layers/poi-z11.yml | 1 - layers/poi-z12.yml | 42 --------------------------------- layers/poi-z14.yml | 2 ++ layers/poi-z15.yml | 18 ++++++++++++++ layers/poi-z16-primary.yml | 10 -------- layers/road_name-minor.yml | 9 +++---- layers/road_name.yml | 11 +++++---- layers/tunnel-railway.yml | 30 ----------------------- style.yml | 3 --- 11 files changed, 42 insertions(+), 104 deletions(-) delete mode 100644 layers/poi-z12.yml delete mode 100644 layers/tunnel-railway.yml diff --git a/layers/highway-minor-casing.yml b/layers/highway-minor-casing.yml index 2e4b126..88d2865 100644 --- a/layers/highway-minor-casing.yml +++ b/layers/highway-minor-casing.yml @@ -24,15 +24,15 @@ paint: line-color: 'rgba(222, 222, 222, 1)' line-width: - interpolate - - - exponential + - - linear - 0.9 # カーブが大きい - - zoom - 13.5 # zl 8 - 0 # 0 から始めて - 14 # zl 9 から本格的に描画 - - 1 + - 4 - 16 # zl 16 で building の表示が始まり、太さコントロールが必要になる - - 3 + - 10 - 20 # 最大zl, つまり20で - 20 # はみ出さないギリギリの太さ diff --git a/layers/highway-minor.yml b/layers/highway-minor.yml index b6d22bd..0367016 100644 --- a/layers/highway-minor.yml +++ b/layers/highway-minor.yml @@ -2,7 +2,7 @@ id: highway-minor type: line source: geolonia source-layer: transportation -minzoom: 13 +minzoom: 11 filter: - all - - '==' @@ -23,15 +23,17 @@ paint: line-color: '#ffffff' line-width: - interpolate - - - exponential + - - linear - 0.9 # カーブが大きい - - zoom - - 13.5 # zl 8 - - 0 # 0 から始めて + - 11 # zl 8 + - 0.2 # 0 から始めて + - 13 # zl 8 + - 0.5 # 0 から始めて - 14 # zl 9 から本格的に描画 - - 1.2 + - 2 - 16 # zl 16 で building の表示が始まり、太さコントロールが必要になる - - 2.2 + - 6 - 20 # 最大zl, つまり20で - 16 # 太さ20 ならはみ出さない diff --git a/layers/poi-z11.yml b/layers/poi-z11.yml index c41871a..f4c4faa 100644 --- a/layers/poi-z11.yml +++ b/layers/poi-z11.yml @@ -16,7 +16,6 @@ filter: - stadium - landmark - town_hall - - golf - hospital - - '!in' - subclass diff --git a/layers/poi-z12.yml b/layers/poi-z12.yml deleted file mode 100644 index 832ba16..0000000 --- a/layers/poi-z12.yml +++ /dev/null @@ -1,42 +0,0 @@ -id: poi-z12 -type: symbol -source: geolonia -source-layer: poi -minzoom: 12 -filter: - - all - - - '==' - - $type - - Point - - - has - - name - - - 'in' - - class - - museum - - - '!=' - - disputed - - japan_northern_territories -layout: - text-padding: 2 - text-font: - - Noto Sans Universal Regular - text-anchor: top - icon-anchor: bottom - icon-image: - - coalesce - - - image - - - get - - class - - - image - - circle-stroked - text-field: '{name}' - text-offset: - - 0 - - 0.3 - text-size: 12 - text-max-width: 9 -paint: - text-halo-blur: 0.5 - text-color: '#666' - text-halo-width: 1 - text-halo-color: '#ffffff' diff --git a/layers/poi-z14.yml b/layers/poi-z14.yml index 1e18d4b..106c9ce 100644 --- a/layers/poi-z14.yml +++ b/layers/poi-z14.yml @@ -19,6 +19,8 @@ filter: - zoo - convenience - lodging + - museum + - golf - - '!=' - disputed - japan_northern_territories diff --git a/layers/poi-z15.yml b/layers/poi-z15.yml index 4c1aa17..c3bdd45 100644 --- a/layers/poi-z15.yml +++ b/layers/poi-z15.yml @@ -18,6 +18,16 @@ filter: - shop - school - monument + - restaurant + - bar + - cafe + - sushi + - restaurant_noodle + - fast_food + - ice_cream + - restaurant_pizza + - restaurant_seafood + - beer - - '!=' - disputed - japan_northern_territories @@ -34,6 +44,14 @@ layout: - class - - image - circle-stroked + icon-padding: + - interpolate + - - linear + - - zoom + - 15 + - 30 + - 16 + - 0 text-field: '{name}' text-offset: - 0 diff --git a/layers/poi-z16-primary.yml b/layers/poi-z16-primary.yml index dfd94c9..7f63eaa 100644 --- a/layers/poi-z16-primary.yml +++ b/layers/poi-z16-primary.yml @@ -14,16 +14,6 @@ filter: - - 'in' - class - cemetery - - restaurant - - bar - - cafe - - sushi - - restaurant_noodle - - fast_food - - ice_cream - - restaurant_pizza - - restaurant_seafood - - beer - library - fuel - post diff --git a/layers/road_name-minor.yml b/layers/road_name-minor.yml index 65aded5..364aaf4 100644 --- a/layers/road_name-minor.yml +++ b/layers/road_name-minor.yml @@ -14,15 +14,16 @@ filter: - service - track - path - # - - '!in' - # - brunnel - # - tunnel + - - '!in' + - brunnel + - tunnel layout: text-font: - Noto Sans Universal Regular text-size: 12 text-field: '{name}' text-max-width: 8 + text-padding: 50 visibility: visible symbol-placement: line symbol-spacing: @@ -35,6 +36,6 @@ layout: - - 15 - 600 paint: - text-color: '#333333' + text-color: '#666666' text-halo-width: 1.2 text-halo-color: rgba(255,255,255,0.8) diff --git a/layers/road_name.yml b/layers/road_name.yml index 2012bea..968b0ae 100644 --- a/layers/road_name.yml +++ b/layers/road_name.yml @@ -14,15 +14,16 @@ filter: - primary - secondary - tertiary - # - - '!in' - # - brunnel - # - tunnel + - - '!in' + - brunnel + - tunnel layout: text-font: - Noto Sans Universal Regular - text-size: 12 + text-size: 13 text-field: '{name}' text-max-width: 8 + text-padding: 50 visibility: visible symbol-placement: line symbol-spacing: @@ -35,6 +36,6 @@ layout: - - 15 - 600 paint: - text-color: '#333333' + text-color: '#666666' text-halo-width: 1.2 text-halo-color: rgba(255,255,255,0.8) diff --git a/layers/tunnel-railway.yml b/layers/tunnel-railway.yml deleted file mode 100644 index 022e4f0..0000000 --- a/layers/tunnel-railway.yml +++ /dev/null @@ -1,30 +0,0 @@ -id: tunnel-railway -type: line -source: geolonia -source-layer: transportation -filter: - - all - - - '==' - - brunnel - - tunnel - - - '==' - - class - - rail - - - '!=' - - subclass - - subway -paint: - line-color: '#A58043' - line-opacity: 0.4 - line-width: - base: 1.4 - stops: - - - 10 - - 0.5 - - - 18 - - 2 - - - 22 - - 18 - line-dasharray: - - 6 - - 4 diff --git a/style.yml b/style.yml index d8ff4b8..2363e82 100644 --- a/style.yml +++ b/style.yml @@ -85,7 +85,6 @@ layers: - !!inc/file layers/bridge-trunk-primary-casing-blur.yml - !!inc/file layers/bridge-path-casing-blur.yml - !!inc/file layers/bridge-motorway-casing-blur.yml - - !!inc/file layers/tunnel-railway.yml - !!inc/file layers/tunnel-service-track-casing.yml - !!inc/file layers/tunnel-minor-casing.yml - !!inc/file layers/tunnel-secondary-tertiary-casing.yml @@ -147,11 +146,9 @@ layers: - !!inc/file layers/poi-z16-primary.yml - !!inc/file layers/poi-z15.yml - !!inc/file layers/poi-z14.yml - - !!inc/file layers/poi-z12.yml - !!inc/file layers/poi-z11.yml - !!inc/file layers/poi-railway.yml - !!inc/file layers/poi-airport-primary.yml - # - !!inc/file layers/poi-mountain.yml - !!inc/file layers/road_shield_prefectural.yml - !!inc/file layers/road_shield_national.yml - !!inc/file layers/road_shield_highway.yml From 600bb16bd2c27f7750545597b175eae8457cbe62 Mon Sep 17 00:00:00 2001 From: naoki Date: Fri, 15 Jul 2022 15:14:28 +0900 Subject: [PATCH 3/3] fix minzoom --- layers/place-suburb.yml | 8 ++++++++ layers/{poi-z11.yml => poi-z12.yml} | 4 ++-- style.yml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) rename layers/{poi-z11.yml => poi-z12.yml} (96%) diff --git a/layers/place-suburb.yml b/layers/place-suburb.yml index 910c154..9b05a22 100644 --- a/layers/place-suburb.yml +++ b/layers/place-suburb.yml @@ -25,6 +25,14 @@ layout: - 16 text-field: ['upcase', ['get', 'name']] text-letter-spacing: 0.2 + text-padding: + - interpolate + - - linear + - - zoom + - 11 + - 20 + - 15 + - 0 visibility: visible paint: text-color: '#888888' diff --git a/layers/poi-z11.yml b/layers/poi-z12.yml similarity index 96% rename from layers/poi-z11.yml rename to layers/poi-z12.yml index f4c4faa..afb6dff 100644 --- a/layers/poi-z11.yml +++ b/layers/poi-z12.yml @@ -1,8 +1,8 @@ -id: poi-z11 +id: poi-z12 type: symbol source: geolonia source-layer: poi -minzoom: 11 +minzoom: 12 filter: - all - - '==' diff --git a/style.yml b/style.yml index 2363e82..d139e8f 100644 --- a/style.yml +++ b/style.yml @@ -146,7 +146,7 @@ layers: - !!inc/file layers/poi-z16-primary.yml - !!inc/file layers/poi-z15.yml - !!inc/file layers/poi-z14.yml - - !!inc/file layers/poi-z11.yml + - !!inc/file layers/poi-z12.yml - !!inc/file layers/poi-railway.yml - !!inc/file layers/poi-airport-primary.yml - !!inc/file layers/road_shield_prefectural.yml