title: Android google maps - make polyline more straighter /smoother
body: <p>I am creating app to draw my walking path by GPS. Everything is okay, path is drawing when I walk, but I have one question - it is possible somehow to make path line straighter programmatically? </p>
  
  <p>For example. First, after walking I see my path like this(it is not polyline, it is polygon in example, but I think you will get the idea):
  <a href="https://www.dropbox.com/s/763mq0wja6x7lpy/11.png" rel="nofollow">https://www.dropbox.com/s/763mq0wja6x7lpy/11.png</a></p>
  
  <p>But after saving, app made path more straighter/smoother:
  <a href="https://www.dropbox.com/s/npwkz9coqve7m4g/22.png" rel="nofollow">https://www.dropbox.com/s/npwkz9coqve7m4g/22.png</a></p>
  
  <p>How to do this? Because I don't have any idea. </p>
  
  <p>I am drawing path with <code>LocationListener</code>:</p>
  
  <blockquote>
    <p>LocationManager locationManager =
    (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);</p>
  
  <pre><code>    Criteria criteria = new Criteria();
    //criteria.setPowerRequirement(Criteria.POWER_LOW); 
      criteria.setAccuracy(Criteria.ACCURACY_FINE);
      criteria.setAltitudeRequired(false);
      criteria.setBearingRequired(false);
      criteria.setCostAllowed(true);
      criteria.setSpeedRequired(false);       
      String bestProvider = locationManager.getBestProvider(criteria, true);
      locationManager.requestLocationUpdates(bestProvider, 500, 3, this );
  </code></pre>
  </blockquote>
  
  <p>And onLocationChanged listener:</p>
  
  <blockquote>
    <p>@Override<br>
    public void onLocationChanged(Location location) {</p>
  
  <pre><code>          if(lastLocationloc == null) 
                            lastLocationloc = location;     
            LatLng lastLatLng= locationToLatLng(lastLocationloc);
            LatLng thisLatLng= locationToLatLng(location);
            mMap.addPolyline
                         (new PolylineOptions().add(lastLatLng).add(thisLatLng).width(4).color(Color.RED));
            lastLocationloc = location;             
    }
  </code></pre>
  </blockquote>