private void drawLineBetweenDTOPoints(PointDTO pointDTO, PointDTO pointBeforeEditedPoint) { int color = Color.rgb(255,165,0); Polyline line = googleMap.addPolyline(new PolylineOptions() .add(new LatLng(pointDTO.getLat(), pointDTO.getLon()), new LatLng(pointBeforeEditedPoint.getLat(),pointBeforeEditedPoint.getLon() )) .width(15) .color(color)); lines.add(line); } private Polyline drawLineBetweenPoints(Marker mark, Marker lastMarker) { int color = Color.rgb(255,165,0); return googleMap.addPolyline(new PolylineOptions() .add(new LatLng(lastMarker.getPosition().latitude, lastMarker.getPosition().longitude), new LatLng(mark.getPosition().latitude, mark.getPosition().longitude)) .width(15) .color(color)); }