Skip to content

Commit

Permalink
Merge pull request #70 from binh-dam-ibigroup/labeled-modes-fix
Browse files Browse the repository at this point in the history
Label bus routes by default if labeledModes not provided
  • Loading branch information
evansiroky authored Jun 3, 2021
2 parents 49a8dc4 + f155c30 commit 6a89329
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/labeler/labeler.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,11 @@ export default class Labeler {
})
})

// Generate labels for GTFS route/mode types listed in labeledModes.
// Generate labels for GTFS route/mode types listed in labeledModes if provided.
// If labeled modes is not provided, only label the buses (mode '3').
var edgeGroups = []
const labeledModes = this.transitive.options.labeledModes
const busModes = [3]
const labeledModes = this.transitive.options.labeledModes || busModes
forEach(this.transitive.network.paths, path => {
forEach(path.segments, segment => {
if (segment.type === 'TRANSIT' && labeledModes.includes(segment.getMode())) {
Expand Down

0 comments on commit 6a89329

Please sign in to comment.