0
      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
}

here i got my destination point as cabloc(destination point) and it was passed by previous class edit text. using this cabloc and my current location i want to draw a path. is it possible to draw path using passed intent value. Please show me some examples. i referred more posts. sorry for asking this question again.

user235466
  • 13
  • 4
  • see my answer http://stackoverflow.com/a/13563148/942224 and see also http://tw.tonytuan.org/2009/06/android-driving-direction-route-path.html – Sanket Kachhela Oct 07 '13 at 10:56
  • @SanketKachhela [link](http://iamvijayakumar.blogspot.in/2013/04/android-draw-route-between-two-geo.html) i am following this tutorial. in this i want to give my current location instead of from location also i set destination as passing location from previous class. in this code is it possible to set my passed cabloc value and display in map. – user235466 Oct 07 '13 at 11:05
  • yes this link is for map v2. so you have to follow this – Sanket Kachhela Oct 07 '13 at 11:13
  • how to assign my passed intent value to fromlocation. – user235466 Oct 07 '13 at 11:24
  • just pass your source latitude and longitude in bundle as putExtras and get those value in MainActivity of that example – Sanket Kachhela Oct 07 '13 at 11:30

0 Answers0