Skip to content

Commit

Permalink
Download score results for analysis elsewhere. #5
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Dec 27, 2024
1 parent 6f5aaa3 commit d64bb5e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions web/src/ScoreMode.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { downloadGeneratedFile } from "svelte-utils";
import * as Comlink from "comlink";
import { Loading, NavBar, PickAmenityKinds, PickProfile } from "./common";
import type { Feature, FeatureCollection, Point } from "geojson";
Expand Down Expand Up @@ -74,6 +75,12 @@
}
}
$: updateRoute(hoveredAmenity);
function download() {
if (gj) {
downloadGeneratedFile("15m_scores.geojson", JSON.stringify(gj));
}
}
</script>

{#if gj == null}
Expand Down Expand Up @@ -124,6 +131,10 @@
target="_blank">OpenStreetMap Carto</a
>
</p>

<button class="secondary" on:click={download} disabled={gj == null}
>Download results</button
>
</div>
<div slot="map">
{#if gj}
Expand Down

0 comments on commit d64bb5e

Please sign in to comment.