double getAccurancyDistance(double lat_a, double lng_a, double lat_b, double lng_b);
}
实现类:
package com.computedistance.impl;
import java.security.InvalidParameterException;
import com.baidu.mapapi.utils.DistanceUtil;
import com.baidu.platform.comapi.basestruct.GeoPoint;
import com.computedistance.DistanceComputeInterface;
public class DistanceComputeImpl implements DistanceComputeInterface{
private final static double DEF_PI = 3.14159265359; // PI
private final static double DEF_2PI= 6.28318530712; // 2*PI
private final static double DEF_PI180= 0.01745329252; // PI/180.0
private final static double DEF_R =6370693.5; // radius of earth
private static DistanceComputeImpl instance = null;
public synchronized static DistanceComputeImpl getInstance(){
if (instance == null) {
instance = new DistanceC