Facebook
From Jittery Crow, 6 Years ago, written in Java.
Embed
Download Paste or View Raw
Hits: 240
  1. private void drawLineBetweenDTOPoints(PointDTO pointDTO, PointDTO pointBeforeEditedPoint) {
  2.         int color = Color.rgb(255,165,0);
  3.         Polyline line = googleMap.addPolyline(new PolylineOptions()
  4.                 .add(new LatLng(pointDTO.getLat(), pointDTO.getLon()), new LatLng(pointBeforeEditedPoint.getLat(),pointBeforeEditedPoint.getLon() ))
  5.                 .width(15)
  6.                 .color(color));
  7.         lines.add(line);
  8.  
  9.     }
  10.  
  11. private Polyline drawLineBetweenPoints(Marker mark, Marker lastMarker) {
  12.         int color = Color.rgb(255,165,0);
  13.         return   googleMap.addPolyline(new PolylineOptions()
  14.                 .add(new LatLng(lastMarker.getPosition().latitude, lastMarker.getPosition().longitude), new LatLng(mark.getPosition().latitude, mark.getPosition().longitude))
  15.                 .width(15)
  16.                 .color(color));
  17.     }