Skip to content

Commit

Permalink
add main sprites layer [#238]
Browse files Browse the repository at this point in the history
limit to 4 kinds of green icons for now
  • Loading branch information
bdon committed Oct 10, 2024
1 parent 19bb367 commit 3f6eef6
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion styles/src/base_layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1485,9 +1485,54 @@ export function labels_layers(
paint: {
"text-color": t.roads_label_major,
"text-halo-color": t.roads_label_major_halo,
"text-halo-width": 2,
"text-halo-width": 1,
"text-halo-blur": 1,
},
},
...(t.pois
? [
{
id: "pois",
type: "symbol",
source: source,
"source-layer": "pois",
filter: [
"all",
[
"in",
["get", "kind"],
["literal", ["forest", "park", "peak", "marina"]],
],
[">=", ["zoom"], ["get", "min_zoom"]],
],
layout: {
"icon-image": ["get", "kind"],
"text-font": ["Noto Sans Regular"],
"text-justify": "auto",
"text-field": get_multiline_name(
lang,
script,
) as DataDrivenPropertyValueSpecification<string>,
"text-size": 10,
"text-max-width": 8,
"text-offset": [1, 0],
"text-variable-anchor": ["left", "right"],
},
paint: {
"text-color": [
"case",
[
"in",
["get", "kind"],
["literal", ["park", "peak", "forest", "marina"]],
],
t.pois.green,
t.earth,
],
},
},
]
: []),
{
id: "places_subplace",
type: "symbol",
Expand Down

0 comments on commit 3f6eef6

Please sign in to comment.