Getting nearest bus stations from Google Map inside Android Application

旧城冷巷雨未停 提交于 2019-12-13 02:14:58

问题


I am working on an Android application in which I need to achieve the following goals.

  1. Get the current position(co-ordinates) of the device - Done
  2. Search within a given radius centering the device position for the nearest bus stations and List them.

I need help on the second thing. Is there any way to get the Nearest bus stations from the Google Map inside an android application? Can I use Google Places API to achieve this?(the official page says that it's still experimental). If yes, how?

Thanks.


回答1:


I could successfully achieve these by referring Davy's Tech Blog Article and the code sample provided in Github

Thanks for your help.




回答2:


Do a reverse geocoding on your coordinates:

https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding

then do a search like this:

https://maps.google.com/maps?q=transit stop near the_address_obtain_with_reverse_geocoding&output=json



来源:https://stackoverflow.com/questions/12401510/getting-nearest-bus-stations-from-google-map-inside-android-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!