You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
680 B
26 lines
680 B
import { Layer } from "react-map-gl";
|
|
import { otherPostamatesLayer } from "./layers-config";
|
|
import { useLayersVisibility } from "../../stores/useLayersVisibility";
|
|
import { LAYER_IDS } from "./constants";
|
|
|
|
const typeFilter = ["==", ["get", "type"], "Постамат"];
|
|
|
|
export const OtherPostamates = () => {
|
|
const { isVisible } = useLayersVisibility();
|
|
|
|
return (
|
|
<>
|
|
<Layer
|
|
{...otherPostamatesLayer}
|
|
id={LAYER_IDS.other}
|
|
source={"rivals"}
|
|
source-layer={"public.service_rivals"}
|
|
layout={{
|
|
visibility: isVisible[LAYER_IDS.other] ? "visible" : "none",
|
|
}}
|
|
filter={typeFilter}
|
|
/>
|
|
</>
|
|
);
|
|
};
|