From b6b69fc191ea3393dcd10ce90ae2106ffd809b8a Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 23 Dec 2023 15:49:42 -0500 Subject: [PATCH 1/2] Limit park rendering to nature reserve, national park, protected area --- src/layer/park.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/layer/park.js b/src/layer/park.js index 3cb7f1b4c..44dd7099f 100644 --- a/src/layer/park.js +++ b/src/layer/park.js @@ -3,8 +3,15 @@ import * as Label from "../constants/label.js"; import * as Color from "../constants/color.js"; +const parkLayerFilter = [ + "in", + ["get", "class"], + ["literal", ["nature_reserve", "national_park", "protected_area"]], +]; + export const fill = { id: "protected-area_fill", + filter: parkLayerFilter, type: "fill", paint: { "fill-color": Color.parkFill, @@ -15,6 +22,7 @@ export const fill = { export const outline = { id: "protected-area_outline", + filter: parkLayerFilter, type: "line", paint: { "line-color": Color.parkOutline, @@ -27,7 +35,7 @@ export const outline = { export const label = { id: "protected-area_label", type: "symbol", - filter: ["has", "rank"], + filter: ["all", ["has", "rank"], parkLayerFilter], paint: { "text-color": Color.parkLabel, "text-halo-blur": 1, From 9642b23919dcc9d77245b4bd29c4c83cf02bc834 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 23 Dec 2023 17:31:54 -0500 Subject: [PATCH 2/2] Change to exclusion filter --- src/layer/park.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/layer/park.js b/src/layer/park.js index 44dd7099f..bcf2cebd3 100644 --- a/src/layer/park.js +++ b/src/layer/park.js @@ -3,11 +3,7 @@ import * as Label from "../constants/label.js"; import * as Color from "../constants/color.js"; -const parkLayerFilter = [ - "in", - ["get", "class"], - ["literal", ["nature_reserve", "national_park", "protected_area"]], -]; +const parkLayerFilter = ["!=", ["get", "class"], "aboriginal_lands"]; export const fill = { id: "protected-area_fill",