From 3bc5886c7e61169bf71c8ff6ce3bac5731e0b65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Fri, 8 Sep 2023 13:42:30 +0300 Subject: [PATCH 01/22] Add pikaratikka to the maps --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7c03b26..7b3fc5d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4980,8 +4980,8 @@ hpack.js@^2.1.6: wbuf "^1.1.0" hsl-map-style@hsldevcom/hsl-map-style#master: - version "1.0.0" - resolved "https://codeload.github.com/hsldevcom/hsl-map-style/tar.gz/33563ec151f4a8ebbc746c538497837f9f95b15a" + version "1.1.0" + resolved "https://codeload.github.com/hsldevcom/hsl-map-style/tar.gz/988864d585a330d543b54a20d08ec044a1616ef3" dependencies: lodash "^4.17.4" From 9412f31c775a41ff0980d6ac0b788dd67ccde04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Fri, 8 Sep 2023 15:58:58 +0300 Subject: [PATCH 02/22] Add icons and colors for pikaratikka --- src/components/map/stopSymbol.js | 9 ++++++--- src/icons/icon_lrail.svg | 19 +++++++++++++++++++ src/util/domain.js | 3 +++ 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 src/icons/icon_lrail.svg diff --git a/src/components/map/stopSymbol.js b/src/components/map/stopSymbol.js index b5e4b46..d7aa173 100644 --- a/src/components/map/stopSymbol.js +++ b/src/components/map/stopSymbol.js @@ -5,15 +5,18 @@ import { colorsByMode } from 'util/domain'; const strokeWidth = 1; -const StopSymbol = props => { +const StopSymbol = (props) => { const modes = [...new Set(props.routes.map(({ mode }) => mode))]; const colors = []; - if (props.routes.some(route => route.trunkRoute)) { + if (props.routes.some((route) => route.trunkRoute)) { colors.push(colorsByMode.TRUNK); } if (modes.includes('TRAM')) { colors.push(colorsByMode.TRAM); } + if (modes.includes('L_RAIL')) { + colors.push(colorsByMode.L_RAIL); + } if (modes.includes('RAIL')) { colors.push(colorsByMode.RAIL); } @@ -23,7 +26,7 @@ const StopSymbol = props => { if (modes.includes('FERRY')) { colors.push(colorsByMode.FERRY); } - if (modes.includes('BUS') && props.routes.some(route => !route.trunkRoute)) { + if (modes.includes('BUS') && props.routes.some((route) => !route.trunkRoute)) { colors.push(colorsByMode.BUS); } diff --git a/src/icons/icon_lrail.svg b/src/icons/icon_lrail.svg new file mode 100644 index 0000000..4c2beaf --- /dev/null +++ b/src/icons/icon_lrail.svg @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/util/domain.js b/src/util/domain.js index 3c2055b..948fc58 100644 --- a/src/util/domain.js +++ b/src/util/domain.js @@ -1,5 +1,6 @@ import busIcon from 'icons/icon_bus.svg'; import tramIcon from 'icons/icon_tram.svg'; +import lRailIcon from 'icons/icon_lrail.svg'; import railIcon from 'icons/icon_rail.svg'; import subwayIcon from 'icons/icon_subway.svg'; import ferryIcon from 'icons/icon_ferry.svg'; @@ -87,6 +88,7 @@ function isDropOffOnly({ pickupDropoffType }) { const colorsByMode = { TRUNK: '#ff6319', TRAM: '#00985f', + L_RAIL: '##00b2a9', RAIL: '#8c4799', SUBWAY: '#ff6319', BUS: '#007AC9', @@ -96,6 +98,7 @@ const colorsByMode = { const iconsByMode = { BUS: busIcon, TRAM: tramIcon, + L_RAIL: lRailIcon, RAIL: railIcon, SUBWAY: subwayIcon, FERRY: ferryIcon, From 67b730a2bd21275606d3df31e7f81987631efc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Mon, 11 Sep 2023 17:51:22 +0300 Subject: [PATCH 03/22] Fix typo on color code --- src/util/domain.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/domain.js b/src/util/domain.js index 948fc58..d8fb229 100644 --- a/src/util/domain.js +++ b/src/util/domain.js @@ -6,7 +6,6 @@ import subwayIcon from 'icons/icon_subway.svg'; import ferryIcon from 'icons/icon_ferry.svg'; import trunkIcon from 'icons/icon_trunk.svg'; -const TRUNK_ROUTES = ['550', '560', '500', '510', '200', '570', '20', '30', '40']; const RAIL_ROUTE_ID_REGEXP = /^300[12]/; const SUBWAY_ROUTE_ID_REGEXP = /^31/; @@ -88,7 +87,7 @@ function isDropOffOnly({ pickupDropoffType }) { const colorsByMode = { TRUNK: '#ff6319', TRAM: '#00985f', - L_RAIL: '##00b2a9', + L_RAIL: '#00b2a9', RAIL: '#8c4799', SUBWAY: '#ff6319', BUS: '#007AC9', @@ -130,5 +129,4 @@ export { getColor, getIcon, getRouteType, - routeTypes, }; From 3bfe059f9a1c2aca80b5c610206283dcebc1da15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Thu, 28 Sep 2023 09:26:44 +0300 Subject: [PATCH 04/22] Change pikaratikka to updated color --- src/icons/icon_lrail.svg | 2 +- src/util/domain.js | 2 +- yarn.lock | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/icons/icon_lrail.svg b/src/icons/icon_lrail.svg index 4c2beaf..1c4eacb 100644 --- a/src/icons/icon_lrail.svg +++ b/src/icons/icon_lrail.svg @@ -2,7 +2,7 @@