Commit 234a148c by 向延琳
2 parents f061ea54 40a1eaa7
...@@ -636,12 +636,12 @@ public class HdaoGpsComponent { ...@@ -636,12 +636,12 @@ public class HdaoGpsComponent {
mbm.setLat(latlng(respHolder.value.gps.lat)); mbm.setLat(latlng(respHolder.value.gps.lat));
mbm.setLng(latlng(respHolder.value.gps.lng)); mbm.setLng(latlng(respHolder.value.gps.lng));
double[] googleGps = GpsCorrect.gpsToGoogle(Double.parseDouble(mbm.getLat()), Double.parseDouble(mbm.getLng())); double[] googleGps = GpsCorrect.gpsToGoogle(Double.parseDouble(mbm.getLat()), Double.parseDouble(mbm.getLng()));
mbm.setElat(googleGps[0] + ""); mbm.setElat(latlng(googleGps[0]));
mbm.setElng(googleGps[1] + ""); mbm.setElng(latlng(googleGps[1]));
double[] baiduGps = GpsCorrect.gpsToGoogle(Double.parseDouble(mbm.getLat()), Double.parseDouble(mbm.getLng())); double[] baiduGps = GpsCorrect.gpsToGoogle(Double.parseDouble(mbm.getLat()), Double.parseDouble(mbm.getLng()));
mbm.setBlat(baiduGps[0] + ""); mbm.setBlat(latlng(baiduGps[0]));
mbm.setBlng(baiduGps[1] + ""); mbm.setBlng(latlng(baiduGps[1]));
mbm.setAddress(respHolder.value.gps.addr); mbm.setAddress(respHolder.value.gps.addr);
return mbm; return mbm;
} }
...@@ -658,6 +658,18 @@ public class HdaoGpsComponent { ...@@ -658,6 +658,18 @@ public class HdaoGpsComponent {
return df.format((double) value / 1000000); return df.format((double) value / 1000000);
} }
/**
* 数字转经纬度
*
* @param value
* @param value
* @return
*/
public String latlng(double value) {
java.text.DecimalFormat df = new java.text.DecimalFormat("#.000000");
return df.format(value);
}
public MobileBaseModel analyzeByJuhe(String lac, String cell) { public MobileBaseModel analyzeByJuhe(String lac, String cell) {
String juheUrl = PropertiesUtils.getProperty("bs.juhe.url"); String juheUrl = PropertiesUtils.getProperty("bs.juhe.url");
......
...@@ -411,6 +411,7 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService { ...@@ -411,6 +411,7 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
BeanUtils.copyProperties(mbModel, location); BeanUtils.copyProperties(mbModel, location);
location.setStoreTime(bsModel.getStoreTime()); location.setStoreTime(bsModel.getStoreTime());
location.setDateTime(bsModel.getTime()); location.setDateTime(bsModel.getTime());
location.setSpeed("0");
retList.add(location); retList.add(location);
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!