I have start latitude, longitude and end latitude,longitude.
I find Geo Point using latitude and longitude.
After that i draw line between the two Geo points
The checked solution does not work for me.
Anyway, i have found an easiest solution :
private GeoPoint midPoint(double lat1,double lon1,double lat2,double lon2){
//create origin geopoint from parameters
GeoPoint origin = new GeoPoint(lat1,lon1);
//create destination geopoints from parameters
GeoPoint destination = new GeoPoint(lat2,lon2);
//calculate and return center
return GeoPoint.fromCenterBetween(origin, destination);
}
If you have origin and destination as GeoPoint, you can use directly "GeoPoint.fromCenterBetween" method.