优化首页
This commit is contained in:
parent
47cd76ee91
commit
d859bfedd3
@ -119,8 +119,8 @@ public class Gga {
|
||||
if(params.length == 11){
|
||||
Gga gga = new Gga();
|
||||
try {
|
||||
gga.setLatitude(Double.parseDouble(params[2]));
|
||||
gga.setLongitude(Double.parseDouble(params[4]));
|
||||
gga.setLatitude(transGGAPos(Double.parseDouble(params[2])));
|
||||
gga.setLongitude(transGGAPos(Double.parseDouble(params[4])));
|
||||
gga.setAltitude(Double.parseDouble(params[9]));
|
||||
gga.setQuality(Integer.parseInt(params[6]));
|
||||
gga.setSatellitesInUsed(Integer.parseInt(params[7]));
|
||||
@ -135,6 +135,11 @@ public class Gga {
|
||||
return null;
|
||||
}
|
||||
|
||||
static double transGGAPos(double pos){
|
||||
int degree = (int) (pos/100);
|
||||
return degree + (pos-degree*100)/60;
|
||||
}
|
||||
|
||||
public Gga(double latitude, double longitude) {
|
||||
this.latitude = latitude;
|
||||
this.longitude = longitude;
|
||||
|
||||
@ -86,11 +86,17 @@
|
||||
[
|
||||
[# th:each="device : ${deviceList}"]
|
||||
{deviceid:[[${device.deviceid}]],
|
||||
latitude:[[${device.latitude}]]/100,
|
||||
longitude:[[${device.longitude}]]/100},
|
||||
latitude:[[${device.latitude}]],
|
||||
longitude:[[${device.longitude}]]},
|
||||
[/]
|
||||
];
|
||||
//console.log(deviceList);
|
||||
/*var i=0;
|
||||
for(; i<deviceList.length; i++) {
|
||||
point = new BMapGL.Point(deviceList[i].longitude, deviceList[i].latitude);
|
||||
map.addOverlay(new BMapGL.Marker(point));
|
||||
}
|
||||
if(i>0) map.setCenter(point);*/
|
||||
|
||||
translateCallback = function (data){
|
||||
if(data.status === 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user