From 075105393d75721c1f440b292bc85d9739edeb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Sat, 25 Jul 2020 01:05:03 +0200 Subject: [PATCH] Rename `points` to `nodes` in front/map.js --- package.json | 2 +- src/front/map.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a324894..667c84f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "back": "node src/back", - "front:debug": "parcel serve src/front/index.html", + "front:dev": "parcel serve src/front/index.html", "front:prod": "npx parcel build src/front/index.html --no-source-maps --no-autoinstall", "lint": "eslint ." }, diff --git a/src/front/map.js b/src/front/map.js index 44a4855..bb6c0bd 100644 --- a/src/front/map.js +++ b/src/front/map.js @@ -47,10 +47,10 @@ const makeDataSources = () => const stopsSource = new VectorSource(); segmentsSource.addFeatures( - Object.values(network.segments).map(({routes, points}) => + Object.values(network.segments).map(({routes, nodes}) => new Feature({ colors: getRouteColors(routes), - geometry: new LineString(points.map( + geometry: new LineString(nodes.map( ({lat, lon}) => proj.fromLonLat([lon, lat]) )), })