电子围栏

交易的经纬度,电子围栏的经纬度以及围栏半径
http://blog.csdn.net/kidoo1012/article/details/70214328   

比例尺控件:
http://lbsyun.baidu.com/jsdemo.htm#b0_2
应用编号:10591825
百度地图key:hK3Iy5AzEroNSBC9v3CtPXzsREA9fF6E

经纬度定位:http://lbsyun.baidu.com/jsdemo.htm#i8_4
http://lbsyun.baidu.com/jsdemo.htm#d0_1

device_storage
DEVICE_OUT_STORAGE
device_bind
mer_info
select t.sn, t.device_info from mpi_order t where t.device_info is not null;

select a.* from device_storage a left join DEVICE_OUT_STORAGE b on a.sn = b.sn where a.pkid=’14091118282210000001′;
select b.* from DEVICE_OUT_STORAGE b left join device_storage a on b.sn = a.sn where a.pkid=’14091118282210000001′;

select b.* from DEVICE_OUT_STORAGE b where b.sn=’Q0NL01083832′;

select t.* from device_storage t where t.pkid=’14091118282210000001′;

 

两个经纬度之间的距离:
https://www.cnblogs.com/xinzheng/p/5667364.html

public static double GetDistance(double lng1, double lat1, double lng2, double lat2)
        {
            double radLat1 = lat1 * RAD;
            double radLat2 = lat2 * RAD;
            double a = radLat1 – radLat2;
            double b = (lng1 – lng2) * RAD;
            double s = 2 * Math.Asin(Math.Sqrt(Math.Pow(Math.Sin(a / 2), 2) +
             Math.Cos(radLat1) * Math.Cos(radLat2) * Math.Pow(Math.Sin(b / 2), 2)));
            s = s * EARTH_RADIUS;
            s = Math.Round(s * 10000) / 10000;
            return s;
        }

public String getLatLngDistance(LatLng start, LatLng end){
  //自己实现距离算法:
  /**
   * 计算两点之间距离
   * @param start
   * @param end
   * @return String  多少m ,  多少km
   */
 
   double lat1 = (Math.PI/180)*start.latitude;
   double lat2 = (Math.PI/180)*end.latitude;
   
   double lon1 = (Math.PI/180)*start.longitude;
   double lon2 = (Math.PI/180)*end.longitude;
   
//       double Lat1r = (Math.PI/180)*(gp1.getLatitudeE6()/1E6);
//       double Lat2r = (Math.PI/180)*(gp2.getLatitudeE6()/1E6);
//       double Lon1r = (Math.PI/180)*(gp1.getLongitudeE6()/1E6);
//       double Lon2r = (Math.PI/180)*(gp2.getLongitudeE6()/1E6);
   
   //地球半径
   double R = 6371.004;
   
   //两点间距离 m,如果想要米的话,结果*1000就可以了
   double dis =  Math.acos(Math.sin(lat1)*Math.sin(lat2)+Math.cos(lat1)*Math.cos(lat2)*Math.cos(lon2-lon1))*R;
   NumberFormat nFormat = NumberFormat.getNumberInstance();  //数字格式化对象
   if(dis < 1){               //当小于1千米的时候用,用米做单位保留一位小数
    
    nFormat.setMaximumFractionDigits(1);    //已可以设置为0,这样跟百度地图APP中计算的一样
    dis *= 1000;
    
    return nFormat.format(dis)+”m”;
   }else{
    nFormat.setMaximumFractionDigits(2);
    return nFormat.format(dis)+”km”;
   }
}   

转载自:https://blog.csdn.net/Xiaomingbubu3/article/details/82109290

You may also like...