Android:如何显示两个GeoPoint之间的路由?

时间:2012-12-27 16:46:08

标签: android android-mapview geopoints

使用下一页的示例,它完美无缺。 http://csie-tw.blogspot.com/2009/06/android-driving-direction-route-path.html

但是当我将坐标更改为我的国家(智利)时,我无法显示路线。

我认为这一定是个问题。

UrlString StringBuilder = new StringBuilder ();
urlString.append ("http://maps.google.com/maps?f=d&hl=en");
urlString.append ("& saddr =");/ / from
urlString.append (Double.ToString ((double) src.getLatitudeE6 () / 1.0E6));
urlString.append (",");
urlString.append (Double.ToString ((double) src.getLongitudeE6 () / 1.0E6));
urlString.append ("& daddr =");/ / to
urlString.append (Double.ToString ((double) dest.getLatitudeE6 () / 1.0E6));
urlString.append (",");
urlString.append (Double.ToString ((double) dest.getLongitudeE6 () / 1.0E6));
urlString.append ("& ie = UTF8 & 0 & om = 0 & output = kml");

这是问题吗?

任何解决方案?

1 个答案:

答案 0 :(得分:0)

logcat的: 12-30 01:53:29.688:D / dalvikvm(444):GC_EXTERNAL_ALLOC在61ms内释放了699个对象/ 57992个字节 12-30 01:53:52.207:D / dalvikvm(444):GC_FOR_MALLOC在64ms内释放了4288个对象/ 251664个字节 12-30 01:53:52.437:D / dalvikvm(444):GC_FOR_MALLOC在63ms内释放了10135个对象/ 618320个字节 12-30 01:53:52.648:D / dalvikvm(444):GC_FOR_MALLOC在60ms内释放4973个对象/ 325032字节 12-30 01:53:52.869:D / dalvikvm(444):GC_FOR_MALLOC在67ms内释放了6369个对象/ 389008个字节 12-30 01:53:53.127:D / dalvikvm(444):GC_FOR_MALLOC在67ms内释放了8604个对象/ 656224个字节 12-30 01:53:53.347:D / dalvikvm(444):GC_FOR_MALLOC在67ms内释放了8603个对象/ 609784个字节 12-30 01:53:53.477:I / Maps.MyLocationOverlay(444):从gps请求更新 12-30 01:53:53.747:I / MapActivity(444):处理网络变更通知:已连接 12-30 01:53:53.747:E / MapActivity(444):无法获得连接工厂客户端 12-30 01:53:54.037:D / dalvikvm(444):GC_EXTERNAL_ALLOC在71ms内释放了1000个对象/ 366296个字节 12-30 01:53:55.858:D / dalvikvm(444):GC_EXPLICIT在247ms内释放了8102个对象/ 505920个字节 12-30 01:53:56.218:D / dalvikvm(444):GC_EXTERNAL_ALLOC在57ms内释放了135个对象/ 22680个字节 12-30 01:53:58.199:D / dalvikvm(444):GC_EXPLICIT在61ms内释放了137个对象/ 23768个字节 12-30 01:54:00.468:D / dalvikvm(444):GC_EXPLICIT在56ms内释放了162个对象/ 46864个字节

浏览器中的网址正常。

从:-36.738486,-73.0893到:-36.825623,-73.054372

谢谢!