-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Which lines run near my position #21
Comments
Check the index Api for routes and stops: |
@natalyablanco does this function help? |
yes! I saw that on Friday. I wanna integrate that endpoint today. The response is [{"id":"1:108","shortName":"104","longName":"E-Se (Taxi trufi)","mode":"BUS","color":"00FF66","agencyName":"Sindicato 1ro de mayo"},{"id":"1:107","shortName":"104","longName":"So-E (Taxi trufi)","mode":"BUS","color":"00FF66","agencyName":"Sindicato 1ro de mayo"}] I assume we want to show the shortName, right? |
We discussed this feature before and decided to skip it in the mobile app because the added value for the user might not be high enough compared to the data volume and a more complicated interface. |
Also a hint: the link above refers to an older API. You might want to use 1.0 instead of 0.15: |
Thanks for the link! |
I thought about a map tiles overlay which shows the routes when no plan is loaded. |
I also have a GeoJSON and TopJSON file with all the lines: You can drag this into http://geojson.io/ to see all the lines: |
Looks like |
Hmm looked into it a bit more and its not easy to relate them with these endpoints. Having looked into graphql a bit lately I was able to extract the information from the graphql endpoint though pretty easily. I have also added a script that would convert the data to GeoJSON. (Commit: https://gitlab.com/truffi/data/commit/4578dd1a60b3b0d82e6d8daba949548ea2cdc57c#350e8112e6566b11242ec308a403ff2cb16e747c) The GraphQL query I used is: {
routes {
shortName,
longName,
color,
agency {
name
},
stops {
lat, lon
}
}
} Details how to request the data in https://gitlab.com/truffi/data/blob/master/src/export-lines-geojson.js This gave me a slightly updated map. I am excited to see it when we have the OSM routes as well :D I suggest we consume the endpoint from within the app and cache the result a while. More info on how to get types & fields: https://graphql.org/learn/introspection/ |
We have to query the lines in a way that returns them only for the area we look at though if we keep adding new cities. Will check if the graphql endpoint makes that possible. |
Closing this due to topic inactivity. Internal future strategy: Attracting more women to work on technical tasks like @annikabock or @natalyablanco . Check reactivation of gender diversity. |
As passenger, I want to know which lines are passing by my current place.
Die Idee war so ein bißchen, dass man direkt nach dem Öffnen der App sieht, welche Linien grundsätzlich am Standort vorbeiführen.
The text was updated successfully, but these errors were encountered: