Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Improve town/city visual hierarchy #118

Merged
merged 1 commit into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions icons/place-circled-dot-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/place-dot-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 75 additions & 36 deletions style.json
Original file line number Diff line number Diff line change
Expand Up @@ -4977,13 +4977,14 @@
]
},
"text-font": [
"Noto Sans Bold"
"Noto Sans Regular"
],
"text-field": "{name}",
"text-max-width": 9
},
"paint": {
"text-color": "hsl(0, 0%, 24%)",
"text-color": "#0c0c0e",
"text-opacity": 0.8,
"text-halo-width": 1.2,
"text-halo-color": "rgba(255,255,255,0.8)"
}
Expand All @@ -4997,6 +4998,7 @@
},
"source": "basemap",
"source-layer": "place",
"maxzoom": 17,
"filter": [
"==",
"class",
Expand All @@ -5011,21 +5013,22 @@
"stops": [
[
10,
12
11
],
[
15,
22
20
]
]
},
"text-anchor": "center",
"text-field": "{name}",
"text-max-width": 8,
"visibility": "visible"
},
"paint": {
"text-color": "#333",
"text-halo-width": 1.2,
"text-color": "#0c0c0e",
"text-halo-width": 1.5,
"text-halo-color": "rgba(255,255,255,0.8)"
}
},
Expand All @@ -5038,6 +5041,7 @@
},
"source": "basemap",
"source-layer": "place",
"maxzoom": 17,
"filter": [
"==",
"class",
Expand All @@ -5062,12 +5066,28 @@
},
"text-field": "{name}",
"text-max-width": 8,
"text-offset": [
"step",
["zoom"],
["literal", [0, -0.3]],
8,
["literal", [0, 0]]
],
"text-anchor": {
"stops": [
[0, "bottom"],
[8, "center"]
]
},
"icon-image": "place-dot-black",
"icon-size": 0.25,
"visibility": "visible"
},
"paint": {
"text-color": "#333",
"text-halo-width": 1.2,
"text-halo-color": "rgba(255,255,255,0.8)"
"text-color": "#0c0c0e",
"text-halo-width": 1.5,
"text-halo-color": "rgba(255,255,255,0.8)",
"icon-opacity": ["step", ["zoom"], 1, 8, 0]
}
},
{
Expand All @@ -5079,6 +5099,7 @@
},
"source": "basemap",
"source-layer": "place",
"maxzoom": 16,
"filter": [
"all",
[
Expand All @@ -5098,25 +5119,32 @@
],
"text-size": {
"base": 1.2,
"stops": [
[
7,
14
],
[
11,
24
]
]
"stops": [[7, 13], [10, 18], [15, 26]]
},
"text-field": "{name}",
"text-max-width": 8,
"text-offset": [
"step",
["zoom"],
["literal", [0, -0.3]],
8,
["literal", [0, 0]]
],
"text-anchor": {
"stops": [
[0, "bottom"],
[8, "center"]
]
},
"icon-image": "place-dot-black",
"icon-size": 0.33,
"visibility": "visible"
},
"paint": {
"text-color": "#333",
"text-halo-width": 1.2,
"text-halo-color": "rgba(255,255,255,0.8)"
"text-color": "#0c0c0e",
"text-halo-width": 2,
"text-halo-color": "rgba(255,255,255,0.8)",
"icon-opacity": ["step", ["zoom"], 1, 8, 0]
}
},
{
Expand All @@ -5128,6 +5156,7 @@
},
"source": "basemap",
"source-layer": "place",
"maxzoom": 15,
"filter": [
"all",
[
Expand All @@ -5142,30 +5171,40 @@
]
],
"layout": {
"text-font": [
"Noto Sans Regular"
],
"text-size": {
"base": 1.2,
"text-font": {
"stops": [
[
7,
14
],
[
11,
24
]
[0, ["Noto Sans Bold"]],
[8, ["Noto Sans Regular"]]
]
},
"text-size": {
"base": 1.2,
"stops": [[7, 15], [10, 24], [15, 32]]
},
"text-field": "{name}",
"text-max-width": 8,
"text-offset": [
"step",
["zoom"],
["literal", [0, -0.3]],
8,
["literal", [0, 0]]
],
"text-anchor": {
"stops": [
[0, "bottom"],
[8, "center"]
]
},
"icon-image": "place-circled-dot-black",
"icon-size": 0.5,
"visibility": "visible"
},
"paint": {
"text-color": "#333",
"text-halo-width": 1.2,
"text-halo-color": "rgba(255,255,255,0.8)"
"text-halo-color": "rgba(255,255,255,0.8)",
"icon-opacity": ["step", ["zoom"], 1, 8, 0]
}
},
{
Expand Down