Code example for PolylineOptions

0
   */ 
  public void addPointToPolyline(LatLng latLng) {
 
    // Instantiates a new Polyline object and adds points to define a rectangle 
    if (poly == null) {
      poly = new PolylineOptions().width(40).color(Color.RED).geodesic(true);
    } 
    poly.add(latLng);
    getMap().clear();
    getMap().addPolyline(poly);
    updateCamera(latLng);
  } 
 
  private class LocationDBObserver extends ContentObserver {
 
    public LocationDBObserver(Handler handler) {
      super(handler);
    } 
 
    @Override 
    public void onChange(boolean selfChange, Uri uri) {