public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.history);
cabloc=(TextView)findViewById(R.id.txt_driverLocation);
cabloc.setText(getIntent().getStringExtra("cabloc"));
FragmentManager myFragmentManager = getSupportFragmentManager();
SupportMapFragment myMapFragment
= (SupportMapFragment)myFragmentManager.findFragmentById(R.id.map2);
map = myMapFragment.getMap();
map.setMyLocationEnabled(true);
LatLng myPoint= new LatLng(gpsdataElements.latitude, gpsdataElements.logitude);
Log.d("OpenMapFOrLocation",gpsdataElements.latitude+" "+gpsdataElements.logitude);
map.addMarker(new MarkerOptions().title("mylocation").position(myPoint).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).draggable(true));
map.moveCamera(CameraUpdateFactory.newLatLngZoom(myPoint, 15));
// Zoom in, animating the camera.
map.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);
// TODO Auto-generated method stub
}
这里我的目标点为cabloc(目标点),并且它是由之前的类编辑文本传递的。使用这个cabloc和我当前的位置我想绘制一条路径。是否可以使用传递的intent值绘制路径。请给我看一些例子。我提到了更多帖子。很抱歉再次提出这个问题。