diff --git a/app/component/map/Map.js b/app/component/map/Map.js index b8530ba014..e37a0c5742 100644 --- a/app/component/map/Map.js +++ b/app/component/map/Map.js @@ -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, diff --git a/app/configurations/config.kela.js b/app/configurations/config.kela.js index d01718a7a2..9ef8429630 100644 --- a/app/configurations/config.kela.js +++ b/app/configurations/config.kela.js @@ -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'; @@ -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, }, @@ -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, @@ -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 }; diff --git a/app/configurations/config.matka.js b/app/configurations/config.matka.js index 00fc3035bf..4f37b27cc6 100644 --- a/app/configurations/config.matka.js +++ b/app/configurations/config.matka.js @@ -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: [ @@ -163,6 +158,7 @@ export default { corner2: [55.99, 17.75], }, }, + suggestBikeMaxDistance: 2000000, vehicleRental: {