Skip to content

Commit

Permalink
fix: support OTP2 scooter modes
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed May 10, 2022
1 parent 6f1bf5c commit b4a3049
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/styler/styler.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ export default class Styler {
mode === 'CAR' ||
mode === 'CAR_RENT' ||
mode === 'MICROMOBILITY' ||
mode === 'MICROMOBILITY_RENT'
mode === 'MICROMOBILITY_RENT' ||
mode === 'SCOOTER'
) {
segment.type = mode
} else {
Expand Down
6 changes: 4 additions & 2 deletions lib/styler/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const segments = {
return '#888'
} else if (segment.type.startsWith('BICYCLE')) {
return '#f00'
} else if (segment.type.startsWith('MICROMOBILITY')) {
} else if (segment.type.startsWith('MICROMOBILITY') || segment.type.startsWith('SCOOTER')) {
return '#f5a729'
} else if (segment.type === 'WALK') {
return '#86cdf9'
Expand All @@ -280,7 +280,8 @@ const segments = {
if (
segment.type.startsWith('BICYCLE') ||
segment.type.startsWith('CAR') ||
segment.type.startsWith('MICROMOBILITY')
segment.type.startsWith('MICROMOBILITY') ||
segment.type.startsWith('SCOOTER')
) {
return '8, 3'
}
Expand All @@ -303,6 +304,7 @@ const segments = {
if (segment.type.startsWith('BICYCLE')) return 4
if (segment.type.startsWith('CAR')) return 4
if (segment.type.startsWith('MICROMOBILITY')) return 4
if (segment.type.startsWith('SCOOTER')) return 4
if (segment.mode === 3) return 6 // Buses
}
]
Expand Down

0 comments on commit b4a3049

Please sign in to comment.