Skip to content

Commit 6ede41d

Browse files
committed
Export boundary GJ for debugging/sharing
1 parent 83b9138 commit 6ede41d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

web/src/AutoBoundariesMode.svelte

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import { isLine } from "svelte-utils/map";
1212
import { SplitComponent } from "svelte-utils/top_bar_layout";
1313
import { app, mode, autosave } from "./stores";
14+
import { downloadGeneratedFile } from "svelte-utils";
1415
1516
let gj = JSON.parse($app!.renderAutoBoundaries());
1617
@@ -40,6 +41,13 @@
4041
);
4142
}
4243
}
44+
45+
function download() {
46+
downloadGeneratedFile(
47+
"auto_boundaries.geojson",
48+
JSON.stringify(gj, null, " "),
49+
);
50+
}
4351
</script>
4452

4553
<SplitComponent>
@@ -68,6 +76,7 @@
6876
roads, railways, and water thatform severances. There are many bugs; this
6977
is experimental.
7078
</p>
79+
<button class="secondary" on:click={download}>Export to GeoJSON</button>
7180
</div>
7281

7382
<div slot="map">

0 commit comments

Comments
 (0)