public List<LatLng> getPointsFromMarkers(List<Marker> markers) {
        List<LatLng> points = new ArrayList<LatLng>();
        for (Marker marker : markers) {
            points.add(marker.getPosition());
        }
        return points;
    }
public List < LatLng > getPointsFromMarkers ( List < Marker > markers ) { List < LatLng > points = new ArrayList < LatLng > ( ) ; for ( Marker marker : markers ) { points . add ( marker . getPosition ( ) ) ; } return points ; }
Get a list of points as LatLng from a list of Markers

@param markers list of markers
@return lat lngs