Fix point filters

dev
Platon Yasev 3 years ago
parent 8f3bd0eab8
commit 8e6c05c38b

@ -22,9 +22,14 @@ export const Points = ({ rate: rateRange }) => {
["<=", rate, rateRange[1]],
];
// if (activeTypes.length) {
// result = ["all", result, ["in", "category", ...activeTypes]];
// }
if (activeTypes.length) {
result = [
"all",
["in", ["get", "category"], ["literal", activeTypes]],
[">=", rate, rateRange[0]],
["<=", rate, rateRange[1]],
];
}
console.log(result);
return result;

@ -66,7 +66,7 @@ export const MapPopup = ({ feature, lat, lng, onClose }) => {
onClose={onClose}
closeOnClick={false}
>
<div className={`min-w-[250px]`}>
<div className={`min-w-[${layout.width}px]`}>
{config.map((item) => {
const value = item.field
? feature.properties[item.field]

@ -34,7 +34,7 @@ export const Sidebar = () => {
<ObjectTypesSelect />
<RatingSlider />
<div>
<Button type="primary" block className={"mt-2"}>
<Button type="primary" block className={"mt-2"} disabled>
Экспорт данных
</Button>
</div>

Loading…
Cancel
Save