diff --git a/data/src/data_utils/rco_geoms.py b/data/src/data_utils/rco_geoms.py index 5588ac0a..7dd02bc4 100644 --- a/data/src/data_utils/rco_geoms.py +++ b/data/src/data_utils/rco_geoms.py @@ -1,5 +1,3 @@ -import numpy as np - from classes.featurelayer import FeatureLayer from constants.services import RCOS_LAYERS_TO_LOAD diff --git a/src/components/PropertyMap.tsx b/src/components/PropertyMap.tsx index 175f49b9..8c952d69 100644 --- a/src/components/PropertyMap.tsx +++ b/src/components/PropertyMap.tsx @@ -175,21 +175,21 @@ const PropertyMap: FC = ({ const mapFilter = Object.entries(appFilter).reduce( (acc, [property, filterItem]) => { if (filterItem.values.length) { - if (filterItem.useIndexOfFilter) { - const useIndexOfFilterFilter: any = ["any"]; - filterItem.values.map((item) => { - useIndexOfFilterFilter.push([ + const thisFilterGroup: any = ["any"]; + filterItem.values.forEach((item) => { + if (filterItem.useIndexOfFilter) { + thisFilterGroup.push([ ">=", ["index-of", item, ["get", property]], 0, ]); - }); - acc.push(useIndexOfFilterFilter); - } else { - acc.push(["in", property, ...filterItem.values]); - } - } + } else { + thisFilterGroup.push(["in", ["get", property], item]); + } + }); + acc.push(thisFilterGroup); + } return acc; }, [] as any[]