Skip to content

Commit

Permalink
Merge pull request #5190 from HSLdevcom/DT-6596
Browse files Browse the repository at this point in the history
DT-6596 new kela feeds
  • Loading branch information
optionsome authored Dec 9, 2024
2 parents c37ff25 + 369c388 commit 51a013a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 227 deletions.
2 changes: 1 addition & 1 deletion app/component/map/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class Map extends React.Component {
mergeStops: PropTypes.bool,
leafletMapRef: PropTypes.func,
mapRef: PropTypes.func,
mapLayerRef: PropTypes.func,
mapLayerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
locationPopup: PropTypes.string,
onSelectLocation: PropTypes.func,
bottomPadding: PropTypes.number,
Expand Down
225 changes: 4 additions & 221 deletions app/configurations/config.kela.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable prefer-template */

const matkaConfig = require('./config.matka').default;
const HSLParkAndRideUtils = require('../util/ParkAndRideUtils').default.HSL;

const CONFIG = 'kela';
const APP_TITLE = 'Reittiopas';
Expand All @@ -27,10 +26,8 @@ export default {
},

favicon: './app/configurations/images/default/default-favicon.png',
feedIds: ['kela', 'matkahuolto', 'lansilinjat'],
textLogo: true,
logo: null, // override default logo from matka config

logo: null,
meta: {
description: APP_DESCRIPTION,
},
Expand Down Expand Up @@ -102,80 +99,14 @@ export default {
locale: 'fi_FI',
},

colors: {
primary: '#002c74',
iconColors: {
'mode-airplane': '#0046AD',
'mode-bus': '#007ac9',
'mode-tram': '#5E7921',
'mode-metro': '#CA4000',
'mode-rail': '#8E5EA0',
'mode-ferry': '#247C7B',
'mode-ferry-pier': '#666666',
'mode-citybike': '#FCBC19',
'mode-citybike-secondary': '#333333',
},
},

additionalFeedIds: {
estonia: ['Vikingline', 'Viro'],
},

additionalSearchParams: {
default: {
'boundary.country': 'FIN',
},
estonia: {
'boundary.country': 'EST',
},
},

feedIdFiltering: true,

stopSearchFilter: stop => {
const props = stop.properties;
if (
props?.id?.includes('GTFS:HSL') &&
props?.addendum?.GTFS?.modes?.includes('RAIL')
) {
return false;
}
return true;
},

routeTimetables: {
// route timetable data needs to be up-to-date before this is enabled
// HSL: HSLRouteTimetable,
},
colors: matkaConfig.colors,

redirectReittiopasParams: true,
map: {
minZoom: 5,
areaBounds: {
corner1: [70.25, 32.25],
corner2: [55.99, 17.75],
},
},
suggestBikeMaxDistance: 2000000,

getAutoSuggestIcons: {
citybikes: station => {
if (
station.properties.source === 'citybikesdonkey_hamina' ||
station.properties.source === 'vantaa'
) {
return ['citybike-stop-digitransit-secondary', '#FCBC19'];
}
return ['citybike-stop-digitransit', '#FCBC19'];
},
},

map: { minZoom: 5 },
hideFavourites: true,
hideStopRouteSearch: true,

hideMapLayersByDefault: true,
hideCarSuggestionDuration: true,

hideWalkLegDurationSummary: true,
emphasizeDistance: true,
emphasizeOneWayJourney: true,
Expand Down Expand Up @@ -218,159 +149,11 @@ export default {
staticMessagesUrl: process.env.STATIC_MESSAGE_URL,

showNearYouButtons: false,
narrowNearYouButtons: true,
nearYouModes: [
'bus',
'tram',
'subway',
'rail',
'ferry',
'citybike',
'airplane',
],
useAlternativeNameForModes: ['rail'],

showVehiclesOnStopPage: false,
showVehiclesOnItineraryPage: false,

includeCarSuggestions: true,
includeParkAndRideSuggestions: true,
// Park and ride and car suggestions separated into two switches
separatedParkAndRideSwitch: true,
showBikeAndParkItineraries: true,

parkingAreaSources: ['liipi'],

parkAndRide: {
showParkAndRide: false,
parkAndRideMinZoom: 13,
pageContent: {
default: HSLParkAndRideUtils,
},
},

sourceForAlertsAndDisruptions: {
HSL: {
fi: 'Helsingin seutu',
sv: 'Helsingforsregion',
en: 'Helsinki region',
},
tampere: {
fi: 'Tampereen seutu',
sv: 'Tammerforsregion',
en: 'Tampere region',
},
LINKKI: {
fi: 'Jyväskylän seutu',
sv: 'Jyväskyläregion',
en: 'Jyväskylä region',
},
OULU: {
fi: 'Oulu',
sv: 'Uleåborg',
en: 'Oulu',
},
Rauma: {
fi: 'Rauma',
sv: 'Raumo',
en: 'Rauma',
},
Hameenlinna: {
fi: 'Hämeenlinna',
sv: 'Tavastehus',
en: 'Hämeenlinna',
},
Kotka: {
fi: 'Kotkan seutu',
sv: 'Kotkaregion',
en: 'Kotka region',
},
Kouvola: {
fi: 'Kouvola',
sv: 'Kouvola',
en: 'Kouvola',
},
Lappeenranta: {
fi: 'Lappeenranta',
sv: 'Villmanstrand',
en: 'Lappeenranta',
},
Mikkeli: {
fi: 'Mikkeli',
sv: 'S:t Michel',
en: 'Mikkeli',
},
Vaasa: {
fi: 'Vaasan seutu',
sv: 'Vasaregion',
en: 'Vaasa region',
},
Joensuu: {
fi: 'Joensuun seutu',
sv: 'Joensuuregion',
en: 'Joensuu region',
},
FOLI: {
fi: 'Turun seutu',
sv: 'Åboregion',
en: 'Turku region',
},
Lahti: {
fi: 'Lahden seutu',
sv: 'Lahtisregion',
en: 'Lahti region',
},
Kuopio: {
fi: 'Kuopion seutu',
sv: 'Kuopioregion',
en: 'Kuopio region',
},
Rovaniemi: {
fi: 'Rovaniemi',
sv: 'Rovaniemi',
en: 'Rovaniemi',
},
Kajaani: {
fi: 'Kajaani',
sv: 'Kajana',
en: 'Kajaani',
},
Salo: {
fi: 'Salo',
sv: 'Salo',
en: 'Salo',
},
Pori: {
fi: 'Pori',
sv: 'Björneborg',
en: 'Pori',
},
Raasepori: {
fi: 'Raasepori',
sv: 'Raseborg',
en: 'Raasepori',
},
VARELY: {
fi: 'Varsinais-Suomi',
sv: 'Egentliga Finland',
en: 'Varsinais-Suomi',
},
},
stopCard: {
header: {
virtualMonitorBaseUrl: 'https://matkamonitori.digitransit.fi/',
},
},
// Notice! Turning on this setting forces the search for car routes (for the CO2 comparison only).
showCO2InItinerarySummary: false,
useAssembledGeoJsonZones: 'isOnByDefault',

bikeBoardingModes: {
RAIL: { showNotification: true },
TRAM: { showNotification: true },
FERRY: { showNotification: true },
BUS: { showNotification: true },
},
// Include both bike and park and bike and public, if bike is enabled
includePublicWithBikePlan: true,
locationSearchTargetsFromOTP: [], // remove stop/station location search
};
6 changes: 1 addition & 5 deletions app/configurations/config.matka.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ export default {
keywords: `reitti,reitit,opas,reittiopas,joukkoliikenne`,
},

routeTimetables: {
// route timetable data needs to be up-to-date before this is enabled
// HSL: HSLRouteTimetable,
},

menu: {
copyright: { label: `© Matka.fi ${YEAR}` },
content: [
Expand Down Expand Up @@ -163,6 +158,7 @@ export default {
corner2: [55.99, 17.75],
},
},

suggestBikeMaxDistance: 2000000,

vehicleRental: {
Expand Down

0 comments on commit 51a013a

Please sign in to comment.