Skip to content

Commit

Permalink
Use new route snapper UI
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Nov 25, 2024
1 parent e9d9b40 commit 8e95f8a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 67 deletions.
62 changes: 11 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"humanize-string": "^3.0.0",
"js-cookie": "^3.0.5",
"maplibre-gl": "^4.0.2",
"scheme-sketcher-lib": "github:acteng/scheme-sketcher-lib",
"scheme-sketcher-lib": "github:acteng/scheme-sketcher-lib#route_snapper_next_gen",
"svelte": "^4.2.10",
"svelte-maplibre": "^0.9.7",
"uuid": "^9.0.1"
Expand Down
6 changes: 5 additions & 1 deletion src/lib/browse/layers/points/UserData.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@

<div slot="controls" style="border: 1px solid black; padding: 8px;">
<FileInput label="Load your own GeoJSON file" onLoad={loadFile} />
<p><i>Note this file doesn't leave your computer; it's not uploaded anywhere</i></p>
<p>
<i>
Note this file doesn't leave your computer; it's not uploaded anywhere
</i>
</p>
<p>Currently showing {data.features.length.toLocaleString()} features</p>
</div>
</LayerControl>
Expand Down
8 changes: 0 additions & 8 deletions src/lib/maplibre/zorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,8 @@ export let layerZorder = [
// Problem points are one layer that should display on top of scheme data
browse("problems"),

sketch("edit-polygon-fill"),
sketch("edit-polygon-lines"),
sketch("edit-polygon-vertices"),

sketch("draw-split-route"),

sketch("route-points"),
sketch("route-lines"),
sketch("route-polygons"),

// Draw most things beneath text road labels. These IDs come from the
// MapTiler basemap, and there are different ones for each basemap. Note for
// OS raster basemaps, we draw everything on top of the rasters.
Expand Down
7 changes: 6 additions & 1 deletion src/pages/LandingPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@
<DefaultButton on:click={goToBrowser}>Start</DefaultButton>

<h3>Accessibility</h3>
<p>Our accessibility statement can be found <a href="accessibility.html">here</a>.</p>
<p>
Our accessibility statement can be found <a href="accessibility.html">
here
</a>
.
</p>
</div>
6 changes: 1 addition & 5 deletions src/pages/SketchSchemes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
BoundaryLayer,
ImageLayer,
InterventionLayer,
PolygonToolLayer,
RouteSnapperLayer,
Toolbox,
NewFeatureForm,
} from "scheme-sketcher-lib/draw";
Expand Down Expand Up @@ -107,7 +105,7 @@

{#if $mode.mode == "list" || $mode.mode == "split-route" || $mode.mode == "set-image" || $mode.mode == "streetview"}
<ListMode {cfg} {gjSchemes} />
{:else if $mode.mode == "new-point" || $mode.mode == "new-freehand-polygon" || $mode.mode == "new-snapped-polygon" || $mode.mode == "new-route"}
{:else if $mode.mode == "new-point" || $mode.mode == "new-area" || $mode.mode == "new-route"}
<NewFeatureForm {cfg} {gjSchemes} />
{:else if $mode.mode == "edit"}
<EditFeatureForm {cfg} {gjSchemes} id={$mode.id} />
Expand All @@ -125,8 +123,6 @@
<InterventionLayer {cfg} {gjSchemes} />
<ImageLayer {cfg} />
<Toolbox {cfg} {gjSchemes} {routeSnapperUrl} />
<RouteSnapperLayer {cfg} />
<PolygonToolLayer {cfg} />
{/if}
</MapLibreMap>
</div>
Expand Down

0 comments on commit 8e95f8a

Please sign in to comment.