Skip to content

Commit

Permalink
Merge pull request #73 from miles-grant-ibigroup/support-otp2-scooters
Browse files Browse the repository at this point in the history
Support OTP2 scooter modes
  • Loading branch information
miles-grant-ibigroup authored May 16, 2022
2 parents 6f1bf5c + 48f3ff5 commit 0ff7a36
Show file tree
Hide file tree
Showing 2 changed files with 9 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
9 changes: 7 additions & 2 deletions lib/styler/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ 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 +283,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 +307,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 0ff7a36

Please sign in to comment.