Skip to content

Commit

Permalink
Show elevation on peak labels (close #68)
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Jul 29, 2024
1 parent 7fd7464 commit c7322fe
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions js/mapController.js
Original file line number Diff line number Diff line change
Expand Up @@ -731,12 +731,26 @@ function loadTrailLayers(name) {
"symbol-placement": "point",
"text-field": [
"step", ["zoom"], "",
poiLabelZoom, ["get", "name"]
poiLabelZoom, [
'format',
["get", "name"],
{"text-font": ['literal', ["Americana-Bold"]]},
'\n',
{},
[
"number-format",
['get', 'ele_ft'],
{}
],
{},
" ft",
{},
]
],
"text-optional": true,
"text-size": 11,
"text-line-height": 1.1,
"text-font": ["Americana-Bold"],
"text-font": ["Americana-Regular"],
"text-variable-anchor": ["left", "right", "top", "bottom"],
"text-padding": 5,
"text-offset": [
Expand All @@ -753,7 +767,9 @@ function loadTrailLayers(name) {
"text-halo-color": colors.labelHalo,
},
"filter": [
"has", "name",
"all",
["has", "name"],
["has", "ele_ft"],
]
});
addTrailLayer({
Expand Down

0 comments on commit c7322fe

Please sign in to comment.