Android examples for Map:Location Distance
Calculate distance between two point
public class Main { public static float distance(float x, float y, float sx, float sy) { float dx = x - sx; float dy = y - sy; return (float) Math.sqrt(dx * dx + dy * dy); }/*from w ww. j a v a 2s . com*/ }