Skip to content

Commit 7bbe152

Browse files
cboettigclaude
andcommitted
fix: use match expression for GAP_Sts filter instead of legacy in
The legacy ["in", "property", v1, v2] filter is silently ignored in newer MapLibre versions. Replace with the unambiguous match expression: ["match", ["get", "GAP_Sts"], ["1", "2"], true, false] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0873158 commit 7bbe152

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example-ghpages/layers-input.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
],
4646
"fill-opacity": 0.7
4747
},
48-
"default_filter": ["in", "GAP_Sts", "1", "2"],
48+
"default_filter": ["match", ["get", "GAP_Sts"], ["1", "2"], true, false],
4949
"tooltip_fields": ["Unit_Nm", "GAP_Sts", "Mang_Type"]
5050
}
5151
]

example-k8s/layers-input.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
],
2828
"fill-opacity": 0.7
2929
},
30-
"default_filter": ["in", "GAP_Sts", "1", "2"],
30+
"default_filter": ["match", ["get", "GAP_Sts"], ["1", "2"], true, false],
3131
"tooltip_fields": ["Unit_Nm", "GAP_Sts", "Mang_Type"]
3232
}
3333
]

0 commit comments

Comments
 (0)