user6032761 user6032761 - 1 year ago 82
Android Question

Android: Draw direction in google map java

how to find the best route for multiple locations in google maps api in android? I have some locations as LatLng but I dont know how specify a optimal route

Answer Source
ArrayList<LatLng> directionPoint = latLongList;
            PolylineOptions rectLine = new PolylineOptions().width(8).color(

            for (int i = 0; i < directionPoint.size(); i++) {

            // Adding route on the map

Try this , pass your list of latlongs in latLongList