android - Show route direction in Google Maps -


           googlemap = ((supportmapfragment) getsupportfragmentmanager()                     .findfragmentbyid(r.id.map)).getmap();             googlemap.addmarker(new markeroptions()             .position(                     new latlng(float.parsefloat(latitude), float                             .parsefloat(longitude)))                             .title("marker").title(title));             **googlemap.addpolyline(new polylineoptions()             .add(new latlng( double.parsedouble(latitude1),  double.parsedouble(longitude1)),                     new latlng( double.parsedouble(latitude), double.parsedouble(longitude)))             .width(5).color(color.blue).geodesic(true));;**             googlemap.animatecamera(cameraupdatefactory.newlatlngzoom(                     cameralatlng, 17)); 

so that's have done, code draws line source destination. however, not want draw line, want show route direction.

like picture http://s7.postimg.org/dwdbkq6h7/screenshot_2015_04_14_20_40_58.png

you can use google direction api find route between 2 points.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -