Android的 - 要画两个地理点之间的路线路线、地理、两个、Android

由网友(爱自己没情敌)分享简介:在我的方向班,我有两个地缘points.One对应于当前位置和其他是一个固定的地理point.Current地位将不断changing.I需要绘制路线在这两点之间,需要改变这一行换一换在距离5亿。 In my direction class I have two geo points.One corresponds...

在我的方向班,我有两个地缘points.One对应于当前位置和其他是一个固定的地理point.Current地位将不断changing.I需要绘制路线在这两点之间,需要改变这一行换一换在距离5亿。

In my direction class I have two geo points.One corresponds to current position and other is a fixed geo point.Current position will keeps changing.I need to draw route between these two points and need to change this line for a change in distance of 500m.

推荐答案

我认为最好的解决方案被称为Android的内部地图,活动,显示两个地理点之间的路线。请参考下code。

I think best solution is called android internal map activity to show route between two geo points . Please refer below code.

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 called built in map activity and draw a route path between current and fixed latitude and longitude.

阅读全文

相关推荐

最新文章