From fd55b8f68bcea6a8016087205a3675e6b9ff6140 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:29:39 -0400 Subject: [PATCH] Show group only label on campgrounds --- js/mapController.js | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/js/mapController.js b/js/mapController.js index bc10adf..c7e18a8 100644 --- a/js/mapController.js +++ b/js/mapController.js @@ -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"]]},