Closed kencon closed 3 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?
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).
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.
@kencon so the purple pin and the purple squircle both derive their color of #5d5088
from a route_color
hex value? Is that correct?
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.
Ahh, I see. Thanks for the clarification. I'll take a peek and see what we can do!
Thanks Aaron.
IIRC color comes from route element in stops-for-route API method for drawing colored line on the map.
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.
👍
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
Implemented in OBAKit
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.