计算两个经纬度的距离(Km)
distances(lat1, lng1, lat2, lng2) {
let radLat1 = lat1*Math.PI / 180.0;
let radLat2 = lat2*Math.PI / 180.0;
let disLat = radLat1 - radLat2;
let disLng = lng1*Math.PI / 180.0 - lng2*Math.PI / 180.0;
let dis = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(disLat/2),2) +
Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(disLng/2),2)));
let distan = dis *6378.137 ;// EARTH_RADIUS;
let distance = Math.round(distan * 10000) / 10000;
return distance.toFixed(1);
}