Android アプリで 2 つのジオポイント間のパスを取得しようとしています。道順は必要ありません。パスだけです。私がすでに見つけたのは、2 つのジオポイント間に直線を引くことです (http://djsolid.net/blog/android---draw-a-path-array-of-points-in-mapview)。実際のパスを取得することは可能ですか? GoogleマップのWeb URLを解析せずに2つのジオポイント間の直線だけでなく、実際に歩くことができる道、道路の道を意味しますか?
1 に答える
0
I think the best solution is called android internal map activity to show route between two geo points. Please refer to the code below:
String uri = "http://maps.google.com/maps?saddr=" + currentLatitude+","+currentLongitude+"&daddr="+fixedLatitude+","+fixedLongitude;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
It's called built in map activity and draws a route path between current and fixed latitude
and longitude
.
于 2014-09-03T05:19:17.297 に答える