Skip to content

Commit

Permalink
styles 4.2; add initial set of lapis and slategray icons. [#238] (#327)
Browse files Browse the repository at this point in the history
* * add initial set of lapis and slategray icons. [#238]
* adjust light earth color
* adjust POI text scaling at z17+
  • Loading branch information
bdon authored Oct 23, 2024
1 parent 79010b9 commit eadca87
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Styles v4.2.0
------
* add icons for a few lapis and slategray POIs [#238, #163]
* adjust light theme earth color
* add fonts and landcover as optional properties of `Theme` interface

Tiles v4.0.2
------
- fix buildings `min_height` via @JfrAziz [#323]
Expand Down
82 changes: 76 additions & 6 deletions styles/src/base_layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1506,22 +1506,57 @@ export function labels_layers(
["get", "kind"],
[
"literal",
["beach", "forest", "marina", "park", "peak", "zoo"],
[
"beach",
"forest",
"marina",
"park",
"peak",
"zoo",
"garden",
"bench",
"aerodrome",
"station",
"bus_stop",
"ferry_terminal",
"stadium",
"university",
"library",
"school",
"animal",
"toilets",
"drinking_water",
],
],
],
[">=", ["zoom"], ["get", "min_zoom"]],
[">=", ["zoom"], ["+", ["get", "min_zoom"], 0]],
],
layout: {
"icon-image": ["get", "kind"],
"icon-image": [
"match",
["get", "kind"],
"station",
"train_station",
["get", "kind"],
],
"text-font": [t.regular || "Noto Sans Regular"],
"text-justify": "auto",
"text-field": get_multiline_name(
lang,
script,
t.regular,
) as DataDrivenPropertyValueSpecification<string>,
"text-size": 10,
"text-size": [
"interpolate",
["linear"],
["zoom"],
17,
10,
19,
16,
],
"text-max-width": 8,
"text-offset": [1, 0],
"text-offset": [1.1, 0],
"text-variable-anchor": ["left", "right"],
},
paint: {
Expand All @@ -1532,10 +1567,45 @@ export function labels_layers(
["get", "kind"],
[
"literal",
["beach", "forest", "marina", "park", "peak", "zoo"],
[
"beach",
"forest",
"marina",
"park",
"peak",
"zoo",
"garden",
"bench",
],
],
],
t.pois.green,
[
"in",
["get", "kind"],
[
"literal",
["aerodrome", "station", "bus_stop", "ferry_terminal"],
],
],
t.pois.lapis,
[
"in",
["get", "kind"],
[
"literal",
[
"stadium",
"university",
"library",
"school",
"animal",
"toilets",
"drinking_water",
],
],
],
t.pois.slategray,
t.earth,
],
},
Expand Down
2 changes: 1 addition & 1 deletion styles/src/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const CONTRAST: Theme = {

export const LIGHT: Theme = {
background: "#cccccc",
earth: "#e0e0e0",
earth: "#e2dfda",
park_a: "#cfddd5",
park_b: "#9cd3b4",
hospital: "#e4dad9",
Expand Down

0 comments on commit eadca87

Please sign in to comment.