Find Midpoint between two GeoPoint in Drawing Route By Google Map API
<p>i want to find perfect middle point of drawing route between two GeoPoint </p>

<p>My code like this</p>

<pre><code> List&lt;GeoPoint&gt; _geopoints = decodePoly(_path);
 GeoPoint gp1; 
 GeoPoint gp2; 
 gp2 = _geopoints.get(0);
 System.out.println("gp2 "+gp2);                                           
 Log.d("_geopoints","::"+_geopoints.size());
 System.out.println("_geopoints"+_geopoints.size());
 System.out.println("_midgeopoint"+_geopoints.size()/2);       
 mGeoPointMiddleOne=_geopoints.get(_geopoints.size()/2);


private List&lt;GeoPoint&gt; decodePoly(String encoded) {

            List&lt;GeoPoint&gt; poly = new ArrayList&lt;GeoPoint&gt;();
            int index = 0, len = encoded.length();
            int lat = 0, lng = 0;

            while (index &lt; len) {
                int b, shift = 0, result = 0;
                do {
                    b = encoded.charAt(index++) - 63;
                    result |= (b &amp; 0x1f) &lt;&lt; shift;
                    shift += 5;
                } while (b &gt;= 0x20);
                int dlat = ((result &amp; 1) != 0 ? ~(result &gt;&gt; 1) : (result &gt;&gt; 1));
                lat += dlat;

                shift = 0;
                result = 0;
                do {
                    b = encoded.charAt(index++) - 63;
                    result |= (b &amp; 0x1f) &lt;&lt; shift;
                    shift += 5;
                } while (b &gt;= 0x20);
                int dlng = ((result &amp; 1) != 0 ? ~(result &gt;&gt; 1) : (result &gt;&gt; 1));
                lng += dlng;

                GeoPoint p = new GeoPoint((int) (((double) lat / 1E5) * 1E6),
                        (int) (((double) lng / 1E5) * 1E6));
                poly.add(p);
            }

            return poly;
        }
</code></pre>

<p>In Above Code i get Listof _geopoints between two GeoPoint and for middle geoPoint i just simplly do  </p>

<pre><code>_geopoints.size()/2;
</code></pre>

<p>and Make GeoPoint at </p>

<pre><code> mGeoPointMiddleOne=_geopoints.get(_geopoints.size()/2);                
 float latitude = mGeoPointMiddleOne.getLatitudeE6()/1000000F;
 float longitude= mGeoPointMiddleOne.getLongitudeE6()/1000000F;
</code></pre>

<p>and drop pin with above latitude-longitude 
 but issue is that for some Places i can't get perfect middle point, it only works for some places, so how can i solve this problem ?</p>
