【问题标题】:How can I plot routes "from" a position "to" another position on Google Maps v2?如何在 Google Maps v2 上绘制“从”某个位置“到”另一个位置的路线?
【发布时间】:2012-12-30 14:53:11
【问题描述】:

如何在 Google Maps v2 上绘制“从”一个位置“到”另一个位置的路线?

我使用 api v2 做了一个简单的应用程序,但现在我将绘制到地图中不同位置的路线。

有可能吗?提前致谢! :)

【问题讨论】:

    标签: android api google-maps google-maps-api-2


    【解决方案1】:

    使用 - final Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("http://maps.google.com/maps?" + "saddr="+from +"&daddr="+to));

    intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");

    开始活动(意图);

    【讨论】:

    • 谢谢你只是我需要的,但如果我要绘制通过公共汽车或步行的路线?是否可以添加一些参数?
    猜你喜欢
    • 1970-01-01
    • 2013-04-22
    • 2013-12-18
    • 1970-01-01
    • 1970-01-01
    • 2014-03-04
    • 1970-01-01
    • 2013-07-13
    相关资源
    最近更新 更多