我想传递可变纬度经度到谷歌地图的方向?可以帮助我查看错误或有新的解决方案吗?这是我的java代码:
public void onClickShowMap(View v) {
String latitude = ((TextView) findViewById(R.id.latitude)).getText().toString();
String longitude = ((TextView) findViewById(R.id.longitude)).getText().toString();
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?f=d&daddr="+latitude+","+longitude));
startActivity(intent);
}
发布于 2013-10-10 08:32:33
使用此代码,
最终意向=新意向(活动,Uri.parse("http://maps.google.com/maps?“+ "saddr=”+经度+ ",“+ lon + "&daddr=”+经度+ ",“+经度));intent.setClassName("com.google.android.apps.maps","com.google.android.maps.MapsActivity");((Intent.ACTION_VIEW) this).startActivity( Intent );
https://stackoverflow.com/questions/19289910
复制