Anu*_*ool 52 java android google-maps directions google-maps-android-api-2
我想在两个位置之间找到行车方向:
LatLng(12.917745600000000000,77.623788300000000000)
LatLng(12.842056800000000000,7.663096499999940000)
Run Code Online (Sandbox Code Playgroud)
我试过的代码:
Polyline line = mMap.addPolyline(new PolylineOptions().
add(new LatLng(12.917745600000000000,77.623788300000000000),
new LatLng(12.842056800000000000,7.663096499999940000))
.width(5).color(Color.RED));
Run Code Online (Sandbox Code Playgroud)
但这在两点之间划了一条直线.
有没有其他方法/方法来获得这两点之间的行车路线.
Ake*_*ist 145
我刚刚在Android上发布了我最新的Google Maps Direction API库 https://github.com/akexorcist/Android-GoogleDirectionLibrary
Bas*_*rif 17
这是我正在使用的,
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr="+latitude_cur+","+longitude_cur+"&daddr="+latitude+","+longitude));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addCategory(Intent.CATEGORY_LAUNCHER );
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
109011 次 |
| 最近记录: |