Skip to content

Commit

Permalink
Show group only label on campgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Aug 15, 2024
1 parent 46597a9 commit fd55b8f
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions js/mapController.js
Original file line number Diff line number Diff line change
Expand Up @@ -717,24 +717,39 @@ function loadTrailLayers() {
[
"case",
["any", ["has", "name"], ["has", "ref"]], [
"concat", ["coalesce", ["get", "name"], ["get", "ref"]], ["case", ["any", ["in", ["get", "reservation"], ["literal", ["required", "no"]]], ["==", ["get", "tents"], "no"]], '\n', ""]
"concat",
["coalesce", ["get", "name"], ["get", "ref"]],
[
"case",
["any", ["in", ["get", "reservation"], ["literal", ["required", "no"]]], ["==", ["get", "group_only"], "yes"], ["==", ["get", "tents"], "no"]], '\n',
""
]
],
""
],
{"text-font": ['literal', ["Americana-Bold"]]},
[
"case",
["==", ["get", "reservation"], "required"], [
"case",
["==", ["get", "tents"], "no"], "No tents · Reservation required",
"Reservation required",
["any", ["==", ["get", "group_only"], "yes"], ["==", ["get", "tents"], "no"]], [
"concat", [
"case",
["==", ["get", "group_only"], "yes"], "Groups only",
["==", ["get", "tents"], "no"], "Tents only",
""
],
[
"case",
["in", ["get", "reservation"], ["literal", ["required", "no"]]], " · ",
""
]
],
["==", ["get", "reservation"], "no"], [
"case",
["==", ["get", "tents"], "no"], "No tents · First-come, first-served",
"First-come, first-served",
],
["==", ["get", "tents"], "no"], "No tents",
""
],
{"text-font": ['literal', ["Americana-Regular"]]},
[
"case",
["==", ["get", "reservation"], "required"], "Reservations required",
["==", ["get", "reservation"], "no"], "First-come, first-served",
""
],
{"text-font": ['literal', ["Americana-Regular"]]},
Expand Down

0 comments on commit fd55b8f

Please sign in to comment.