android - how to draw a path using my current location and a passed text location value(intent passed from previous class) -


      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 camera.     map.animatecamera(cameraupdatefactory.zoomto(15), 2000, null);       // todo auto-generated method stub } 

here got destination point cabloc(destination point) , passed previous class edit text. using cabloc , current location want draw path. possible draw path using passed intent value. please show me examples. referred more posts. sorry asking question again.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -