Tag: geocoder

如何使用ruby获得两个坐标之间的汽车路线?

我正在使用谷歌地图和汽车路线开发rails应用程序。 我有一个汽车路线的起点和终点 – 两个坐标。 如何获得完整的汽车路线(汽车通过街道的坐标系列)? 我可以使用gmaps4rails和geocoder吗? 像这样的东西: start_point = [41,2423; 45,323452] end_point = [42,2423; 42,323452] full_route = some_method_for_calculate_route( start_point, end_point ) #paint line on map from array of points paint_line( full_route ) 请帮忙,谢谢你:)