谷歌地图上的路线

时间:2015-09-16 12:24:16

标签: android api google-maps google-api

在我的应用程序中使用googlemap。我通过Api获得发件人的纬度和经度以及目的地纬度和经度。我已经在这些变量中取出了。我希望用标记或任何引脚显示发送者和目的地位置。

 ==> sender_lat =value came from API.

    ==> sender_long =value came from API.

    ==> destination_lat =value came from API.

    ==> destination_long =value came from API.

地图上的路线怎么样。

这里是我在布局中使用的片段的xml代码。

<fragment
            android:id="@+id/map"
            android:name="com.google.android.gms.maps.MapFragment"
            android:layout_width="match_parent"
            android:layout_height="fill_parent"/>

1 个答案:

答案 0 :(得分:0)

您可以使用此代码在Google地图上显示路径,但适用于Android Studio代码

<强> Google-Directions-Android

enter image description here

相关问题