OneBusAway / onebusaway-iphone

OBA development has moved!
https://github.com/OneBusAway/OBAKit
Apache License 2.0
219 stars 117 forks source link

Route trace colors referenced by route_color field #589

Closed kencon closed 3 years ago

kencon commented 8 years ago

Submitting feature enhancement request regarding using route_color hex values (if present) to represent route traces on route map as is already present in the Android beta app.

aaronbrethorst commented 8 years ago

@kencon can you include any additional information about the feature as it's used in Android, today? Screenshots, links to .java files, etc?

kencon commented 8 years ago

Android reference (RouteMapController.java): https://github.com/OneBusAway/onebusaway-android/blob/f44d345c1b9a194fa9c375ec6a7da953678d1297/onebusaway-android/src/main/java/org/onebusaway/android/map/RouteMapController.java

Currently in the Android beta app, route overlays are drawn with the route color as referenced in the RouteMapController source file (as shown below). screenshot_2016-03-29-18-58-59

This would be a great feature to add into the iOS app. One concern would be colors that are too bright and provide little contrast especially for those with visual difficulties.

aaronbrethorst commented 8 years ago

@kencon so the purple pin and the purple squircle both derive their color of #5d5088 from a route_color hex value? Is that correct?

kencon commented 8 years ago

The vehicle's color is derived by the schedule deviation and the pin itself from the vehicle location. The route trace is derived from the route_color field from the input GTFS data. Unfortunately, WMATA doesn't publish the actual GTFS data feed they use in their OBA instance as of yet. Certain details seem to be stripped from their latest GTFS data feed.

aaronbrethorst commented 8 years ago

Ahh, I see. Thanks for the clarification. I'll take a peek and see what we can do!

kencon commented 8 years ago

Thanks Aaron.

barbeau commented 8 years ago

IIRC color comes from route element in stops-for-route API method for drawing colored line on the map.

barbeau commented 8 years ago

The other place we expose GTFS route color in OBA Android is trip details, from trip-details API method:

image

The line is colored based on route color, as is the landmark icon (which appears if the user came to the trip details screen from a screen where that stop was selected).

If route color isn't defined in GTFS, the API should return an empty string for route color.

If its useful, here's the commit that added GTFS route color support in OBA Android, which includes some unit tests and sample JSON responses.

aaronbrethorst commented 8 years ago

👍

Sent from my iPhone

On Mar 29, 2016, at 6:09 PM, Sean Barbeau notifications@github.com wrote:

The other place we expose GTFS route color in OBA Android is trip details, from trip-details API method:

The line is colored based on route color, as is the landmark icon (which appears if the user came to the trip details screen from a screen where that stop was selected).

If route color isn't defined in GTFS, the API should return an empty string for route color.

If its useful, here's the commit that added GTFS route color support in OBA Android, which includes some unit tests and sample JSON responses.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

aaronbrethorst commented 3 years ago

Implemented in OBAKit