|
|
|
|
@ -8,7 +8,7 @@ import { usePointSelection } from "../stores/usePointSelection";
|
|
|
|
|
export const Points = () => {
|
|
|
|
|
const { isVisible } = useLayersVisibility();
|
|
|
|
|
const { filters } = useFilters();
|
|
|
|
|
const { prediction, status } = filters;
|
|
|
|
|
const { prediction, status, categories } = filters;
|
|
|
|
|
const { selection } = usePointSelection();
|
|
|
|
|
const includedArr = [...selection.included];
|
|
|
|
|
const excludedArr = [...selection.excluded];
|
|
|
|
|
@ -20,18 +20,30 @@ export const Points = () => {
|
|
|
|
|
["<=", ["get", "prediction_current"], prediction[1]],
|
|
|
|
|
];
|
|
|
|
|
const statusExpression = ["in", ["get", "status"], ["literal", status]];
|
|
|
|
|
const categoryExpression =
|
|
|
|
|
categories.length > 0
|
|
|
|
|
? ["in", ["get", "category"], ["literal", categories]]
|
|
|
|
|
: true;
|
|
|
|
|
|
|
|
|
|
const matchFilterExpression = [
|
|
|
|
|
"all",
|
|
|
|
|
statusExpression,
|
|
|
|
|
["!", excludedExpression],
|
|
|
|
|
["any", ["all", ...predictionExpression], includedExpression],
|
|
|
|
|
[
|
|
|
|
|
"any",
|
|
|
|
|
["all", ...predictionExpression, categoryExpression],
|
|
|
|
|
includedExpression,
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const unmatchFilterExpression = [
|
|
|
|
|
"all",
|
|
|
|
|
statusExpression,
|
|
|
|
|
["any", excludedExpression, ["!", ["all", ...predictionExpression]]],
|
|
|
|
|
[
|
|
|
|
|
"any",
|
|
|
|
|
excludedExpression,
|
|
|
|
|
["!", ["all", ...predictionExpression, categoryExpression]],
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|