Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions src/lib/browse/schemes/SchemesLayer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
filterLcwipSchemeText,
filterLocalInterventionText,
filterLocalSchemeText,
filterISTInterventionText,
filterISTSchemeText,
finalInspectionsSchemes,
istSchemes,
lcwipSchemes,
localSchemes,
} from "./stores";
Expand All @@ -65,6 +68,13 @@
$: [finalInspectionsColor, finalInspectionsLegend] =
pickStyle("interventionType");

let istName = "ist_schemes";
let istTitle = "IST schemes";
let istShow = showHideLayer(istName);
let istStyle = "interventionType";
$: [istColor, istLegend] =
pickStyle("interventionType");

let localName = "local_schemes";
let localTitle = "Your schemes";
let localShow = showHideLayer(localName);
Expand All @@ -81,6 +91,7 @@
atfSchemes,
lcwipSchemes,
finalInspectionsSchemes,
istSchemes,
);
}
errorMessage = "";
Expand Down Expand Up @@ -217,6 +228,42 @@
</LayerControl>
{/if}

{#if Object.entries($finalInspectionsSchemes.schemes).length > 0}
<LayerControl
name={finalInspectionsName}
title={finalInspectionsTitle}
bind:show={$finalInspectionsShow}
>
<span slot="help">
<p>
<WarningIcon text="Scheme data caveats" />Please note there are data
quality caveats for all scheme data:
</p>
<ul>
{#each $finalInspectionsSchemes.notes ?? [] as note}
<li><p>{note}</p></li>
{/each}
</ul>
</span>

<div slot="controls" style="border: 1px solid black; padding: 8px;">
<Filters
source="LCWIP"
bind:schemesGj={$finalInspectionsSchemes}
bind:filterSchemeText={$filterFinalInspectionsSchemeText}
bind:filterInterventionText={$filterFinalInspectionsInterventionText}
/>

<Select
label="Colour interventions"
choices={[["interventionType", "By intervention type"]]}
bind:value={finalInspectionsStyle}
/>
<Legend rows={finalInspectionsLegend} />
</div>
</LayerControl>
{/if}

{#if Object.entries($lcwipSchemes.schemes).length > 0}
<LayerControl name={lcwipName} title={lcwipTitle} bind:show={$lcwipShow}>
<span slot="help">
Expand Down
15 changes: 8 additions & 7 deletions src/lib/browse/schemes/colors.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
export let atfFundingProgrammes = {
ATF2: "#66c2a5",
"ATF2 or ATF3": "#fc8d62",
ATF3: "#8da0cb",
ATF4: "#e78ac3",
ATF4E: "#a6d854",
ATF5: "#ffd92f",
CATF: "#e5c494",
ATF2: "#1B9E77",
"ATF2 or ATF3": "#D95F02",
ATF3: "#7570B3",
ATF4: "#E7298A",
ATF4E: "#66A61E",
ATF5: "#E6AB02",
CATF: "#A6761D",
PLACEHOLDER: "#666666",
};

export let currentMilestones = {
Expand Down
1 change: 1 addition & 0 deletions src/lib/browse/schemes/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function setupSchemes(
atfStore: Writable<Schemes>,
lcwipStore: Writable<Schemes>,
finalInspectionsStore: Writable<Schemes>,
istStore: Writable<Schemes>,
) {
let atfGj: Schemes = {
type: "FeatureCollection",
Expand Down
8 changes: 8 additions & 0 deletions src/lib/browse/schemes/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ export const finalInspectionsSchemes: Writable<Schemes> = writable({
export const filterFinalInspectionsInterventionText: Writable<string> =
writable("");
export const filterFinalInspectionsSchemeText: Writable<string> = writable("");
export const istSchemes: Writable<Schemes> = writable({
type: "FeatureCollection",
features: [],
schemes: {},
});
export const filterISTInterventionText: Writable<string> =
writable("");
export const filterISTSchemeText: Writable<string> = writable("");

export const lcwipSchemes: Writable<Schemes> = writable({
type: "FeatureCollection",
Expand Down
Loading