Skip to content

Commit

Permalink
In isochrone mode, show edges usable by the mode or not, to understand
Browse files Browse the repository at this point in the history
some weird isochrones
  • Loading branch information
dabreegster committed Apr 28, 2024
1 parent 2ccd56d commit 1e29f41
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
14 changes: 11 additions & 3 deletions web/src/IsochroneMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
import { colorScale } from "./colors";
import type { FeatureCollection } from "geojson";
import { GeoJSON, LineLayer, Marker } from "svelte-maplibre";
import NetworkLayer from "./NetworkLayer.svelte";
import SplitComponent from "./SplitComponent.svelte";
import { mode, model, type TravelMode, filterForMode } from "./stores";
import { makeColorRamp, PickTravelMode } from "./common";
import { makeColorRamp, PickTravelMode, notNull } from "./common";
import { SequentialLegend, Popup } from "svelte-utils";
let travelMode: TravelMode = "foot";
Expand Down Expand Up @@ -64,7 +63,16 @@
{/if}
</div>
<div slot="map">
<NetworkLayer />
<GeoJSON data={JSON.parse(notNull($model).render())}>
<LineLayer
id="network"
paint={{
"line-width": 5,
"line-color": "black",
"line-opacity": ["case", filterForMode(travelMode), 1, 0.5],
}}
/>
</GeoJSON>

<Marker bind:lngLat={start} draggable><span class="dot">X</span></Marker>
{#if gj}
Expand Down
15 changes: 0 additions & 15 deletions web/src/NetworkLayer.svelte

This file was deleted.

0 comments on commit 1e29f41

Please sign in to comment.