diff --git a/src/TreeMap/App.svelte b/src/TreeMap/App.svelte index fab4d7e..72f7166 100644 --- a/src/TreeMap/App.svelte +++ b/src/TreeMap/App.svelte @@ -82,9 +82,17 @@ map.on("load", () => { fetchContributionsData.then((contributions) => { + let filteredContributions; + if (community === "true") { + filteredContributions = contributions; + } else { + filteredContributions = contributions.filter((contrib) => { + return contrib.properties.type !== "gift"; + }); + } const geojson = { type: "FeatureCollection", - features: contributions, + features: filteredContributions, }; map.addSource("contributions", { type: "geojson",