LAT_POSITION and LONG_POSITION is source position
lat and lon is target position
1: Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=" + LAT_POSITION + "," + LONG_POSITION +"&daddr=" + lat + "," + lon));
2: intent.setComponent(new ComponentName("com.google.android.apps.maps","com.google.android.maps.MapsActivity"));
3: startActivity(intent);
沒有留言:
張貼留言