-
Notifications
You must be signed in to change notification settings - Fork 24
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
White transit line not visible on map #810
Comments
After further investigation it seems white is not the correct color for the HSL transit line. Here is official documentation for HSL colors and implementation in Digitransit UI app provided by @tuukka (thanks!) @dgearhart @drewda do we know where the color value is coming from in the response? Do we have incorrect data for HSL or is white the default value? |
Yes. These are the defaults as described in the gtfs spec. https://developers.google.com/transit/gtfs/reference/routes-file |
This seems less than ideal for our use case given the roads in bubble wrap are also white. Is it possible for us to change the default color in our implementation? cc @drewda This is also something we could handle on the client side if updating the service is not a good option. |
I think Transitland shouldn't provide a color if none is specified in the source data. Otherwise, you don't know on the client side if a line is meant to be white or default color. |
FYI, here's the data that Transitland has about the route used in that particular Valhalla response: https://transit.land/api/v1/routes/r-ud9wr-9 {
"identifiers":[
"gtfs://f-ud9-helsinginseudunliikenne/r/1009"
],
"imported_from_feeds":[
{
"feed_onestop_id":"f-ud9-helsinginseudunliikenne",
"feed_version_sha1":"6f35eb7257af44b66838bb46d4b2286231df48bf",
"gtfs_id":null
}
],
"created_or_updated_in_changeset_id":3590,
"onestop_id":"r-ud9wr-9",
"name":"9",
"vehicle_type":"tram",
"geometry":{
...
},
"color":null,
"tags":{
"route_url":"http://aikataulut.hsl.fi/linjat/fi/h9.html",
"route_long_name":"Länsiterminaali-Rautatieasema-Pasila"
},
"stops_served_by_route":[
...
],
"operated_by_onestop_id":"o-ud9-helsinginseudunliikenne",
"operated_by_name":"Helsingin seudun liikenne",
"wheelchair_accessible":"all_trips",
"bikes_allowed":"no_trips",
"created_at":"2016-12-10T02:52:14.883Z",
"updated_at":"2016-12-10T02:52:14.883Z",
"route_stop_patterns_by_onestop_id":[
"r-ud9wr-9-242590-40454a",
"r-ud9wr-9-301a50-721b34",
"r-ud9wr-9-057a81-ced6e8",
"r-ud9wr-9-d72931-59b6f5",
"r-ud9wr-9-104312-33c0fd",
"r-ud9wr-9-bae833-0726ef"
]
} Note that When Valhalla fetches data from Transitland, it sets a default route color of white (https://github.com/valhalla/mjolnir/blob/04568ec48f9404ba1c459a24002ac55351cce26d/src/mjolnir/valhalla_build_transit.cc#L339). A few options:
|
Thanks for the info @drewda. I don't hate the idea of Valhalla returning As for adding the visual outline this would require updates to the stylesheet and possibly Tangram ES so would require some coordination across teams to implement on mobile but could also be a reasonable option. I would be interested to get thoughts from @nvkelso and @matteblair on this approach. |
Tangram-es supports styling polylines with "outlines", so that's a possibility. The question remains whether that is the most desirable option, visually. |
Closing in favor of https://github.com/transitland/transitland/issues/255, #823 |
At first glance it appears the tram leg is not drawn.
However zooming in reveals the line is drawn but it is white.
The JSON response confirms the white color for the tram line.
https://valhalla.mapzen.com/route?json={"costing":"multimodal","directions_options":{"language":"en-US","units":"miles"},"locations":[{"heading":"0","lat":"60.1846","lon":"24.9485"},{"city":"Helsinki","lat":"60.199102","lon":"24.940497","name":"HSL","state":"Uusimaa","street":"HSL"}]}&api_key=[YOUR_API_KEY]
The decimal value for "color"
16777215
, translates to#FFFFFF
hexidecimal color value.The text was updated successfully, but these errors were encountered: