简体   繁体   中英

Tips for new Android app - maps, directions, transit

I'm not asking for anyone to build me an app. I just need some tips on getting started. So what I wanted to do:

  1. be able to map some routes/directions, similar to what Google Maps already has regarding the local transit in a city. Why? Because Google's database is a bit outdated, first. Second, because I want to create a local database with the routes and with the stations. Unfortunately, I can't really do that using Google Maps and I think Leaflet could help me with this much better. This would've been a web app, where someone with an account could add/edit/delete the routes.

  2. create an Android app that :

a) sees the routes, allows an user to find the closest path to get from point A to B using only the routes I have in my database, sort by tram/bus etc

b) allows the user to mark a location and say something like "bus no 37 was here at hour:minute:second" - this would appear for anyone else that is using the app, similar to what another app lets you do this for police cars and traffic jams

c) extra: allow users to input some data so that my app could also give predictions; for example, someone inputs it took 10m50s to get from point X to point Y on route Z. That remains in a database and then someone else inputs some data for the same path...i would create some algorithm that could get predictions on where would a bus be now if someone marked it at Station 'bla' 5 minutes ago. I know, I know, this might be pretty hard, and it would be pretty inaccurate, I should consider the time of day, but it would just be something small, as an extra. Also, would be cool if this stuff could be added automatically: like the user sets the route he's on, starts "recording", then stops it when he gets off the vehicle and the time and locations are automatically taken into consideration.

Hope you understand what I have in my mind. Thing is, what would you recommend?

I know Java, Spring MVC and a bit of Android. JavaScript, HTML and CSS won't be a problem. I need to combine these. If I will use Leaflet, as far as I can find, I won't really be able to use it in an Android APP, I would have to create a web app. At the same time, Google Maps doesn't really let me do what I want for my "personal" database. I can't even create decent custom routes by adding waypoints because parts of the Tramway Line aren't on streets with car access. ALso, would you think this is easier/better to do as an Android app or as a web app? I'm kinda new to Android.

I hope this isn't an unsuitable thing to ask on stackoverflow. I'm open to any ideas.

allows an user to find the closest path to get from point A to B using only the routes I have in my database, sort by tram/bus etc

Routing is hard. Multi-modal routing (tram+bus+car+walking+cycle) even more so. See pgRouting and Valhalla . If you're going to do anything with public transport, then you'll have to deal with GTFS too.

Research into OpenTripPlanner also, as there are several actors developing some similar platforms.

I hope this isn't an unsuitable thing to ask on stackoverflow.

I'm afraid it kinda is - see https://stackoverflow.com/help/on-topic , point 4.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM