Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add transit arrival/departure times #818

Merged
merged 1 commit into from
Jun 23, 2017

Conversation

dhogan-io
Copy link
Contributor

@dhogan-io dhogan-io commented Jun 1, 2017

Overview

Added arrival/departure times to the multimodal transit view. Fixes #699

@sarahsnow1
Copy link
Member

@danielwhogan Thanks for creating a PR! We will take a look at this shortly :)

Copy link
Member

@sarahsnow1 sarahsnow1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I will merge this after #816 gets completed.

if (transitInstruction == null) {
var turnInstruction = instruction.getHumanTurnInstruction()
val pattern = Pattern.compile("\\([0-9]+ stops\\)")
val matcher = pattern.matcher(turnInstruction)
turnInstruction = matcher.replaceAll("")
val transitStops = instruction.getTransitInfo()?.getTransitStops() as ArrayList<TransitStop>
val departureTime = transitStops[0].getDepartureDateTime().substring(11, 16)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created a ticket here to convert these TransitStop properties to Date objects which will make interaction with this property more safe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll switch to a Date object once this issue is resolved.

@sarahsnow1 sarahsnow1 merged commit 9fcd0c3 into mapzen:master Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants