Skip to content

Commit 829fba5

Browse files
committed
Fix a warning from trying to render the neighbourhood boundary as a cell
1 parent d328af5 commit 829fba5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/src/neighbourhood.rs

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ impl Neighbourhood {
132132
.zip(derived.render_cells.colors.iter())
133133
{
134134
let mut f = Feature::from(Geometry::from(&map.mercator.to_wgs84(polygons)));
135+
f.set_property("kind", "cell");
135136
match color {
136137
Color::Disconnected => f.set_property("cell_color", "disconnected"),
137138
Color::Cell(idx) => f.set_property("cell_color", *idx),

web/src/RenderNeighbourhood.svelte

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script lang="ts">
22
import type { Feature, FeatureCollection } from "geojson";
33
import { FillLayer, GeoJSON, LineLayer } from "svelte-maplibre";
4-
import { isPolygon } from "./common";
54
import { showBasemap } from "./stores";
65
76
export let gjInput: FeatureCollection;
@@ -51,7 +50,7 @@
5150
<GeoJSON data={gj} generateId>
5251
<FillLayer
5352
beforeId={$showBasemap ? "Building" : undefined}
54-
filter={isPolygon}
53+
filter={["==", ["get", "kind"], "cell"]}
5554
paint={{
5655
"fill-color": ["get", "color"],
5756
"fill-opacity": 0.3,

0 commit comments

Comments
 (0)