Transportr
Transportr copied to clipboard
Adding clickable stop positions to the map
Acknowledgments
Please check the following boxes with an x
if they apply:
- [x] The feature I want to propose would be useful for the majority of users, not only for me personally.
- [x] I am aware that Transportr is mostly developed by one person in their unpaid spare time.
- [x] I can help myself to get this feature implemented or know someone who wants to do it.
- [ ] If I want to add support for a new region or country, I checked that this is already available in public-transport-enabler and know the process described on the Transportr homepage.
Is your feature request related to a problem? Please describe. The map does not feature much information regarding public transit lines. You can find railway lines when looking closely, but many stations are only displayed (and clickable) when using the "Stations nearby" feature. Only large train stations are shown by default, and those are not clickable.
Describe the solution you'd like
The stations are clickable when searched for with the "Stations nearby" feature. Instead, this should be applied to the map by default. The station in my home town does get a symbol, but it is not clickable. Instead I have to hold down onto it, click "Stations nearby" and then select the then opened red circle. Displaying all stations should not decrease performance much but would increase the usefulness of the map drastically. When zooming out the more important stations (central station, commuter rail, etc.) should be top priority.
Thanks for the suggestion! What do you think about the potential privacy issue that you would constantly send your current position to the API provider? Maybe the feature should have some sort of switch? Opt-in/opt-out?
I don't know exactly how the pte works but maybe there is some way of bulk downloading the stop positions of a larger area. This would mask the current location. Another way could be to use the stop position data of OpenStreetMap (this could be done offline or for a larger area), though then there has to be some sort of mapping to the provider data (via refs or the names, for example). This could lead to problems similar to #517 when there are duplicate names, so this solution could add some complications, but would probably be the privacy friendliest and could also benefit from the higher quality data in the osm as compared to the provider data (at least in my area).
I will look into implementing this as privacy friendly as I can, if anyone has a good idea feel free to comment :-)
Making this feature opt-out is something that I would suggest in any case. Making it opt-in would hide it from many inexperienced users.
I don't know exactly how the pte works but maybe there is some way of bulk downloading the stop positions of a larger area. This would mask the current location.
Yes that's a good point and could be done. You would need to develop a separate script that farms this data by defining a rough bounding box and then do many requests covering the entire bounding box. The generated list of stations would need to get updated once in a while and somehow bundled with Transportr. This either makes the application a lot bigger or you would need a mechanism to download these station bundles on demand and host them somewhere.
Another way could be to use the stop position data of OpenStreetMap (this could be done offline or for a larger area), though then there has to be some sort of mapping to the provider data (via refs or the names, for example).
If you want to use this as real stations in queries, you would need to map this to the stations the API has and for this, you need to know all of them which brings you to the above. Alternatively, when the user clicks a station from OSM, you could do a nearby stations search and hope you find a station very close to the clicked OSM station that you could use for further queries. You just run into problems if there's no station returned by the API or several that are equally close to the clicked one.
Unfortunately, the easiest solution is the less-privacy friendly one and the one using most bandwidth: Whenever the user reaches a certain map zoom level, automatically search for nearby stations in the center of the map with a radius matching the visible part of the map and display them on the map automatically.
One challenge for all options is to show all the station on the without it looking terribly cluttered.
I would suggest to focus on #494 first as it is way easier and faster to achieve success. Also the lessons learned there, will only help with making hundreds of stations on the look nice.