优化首页

This commit is contained in:
weidong 2024-02-03 23:37:00 +08:00
parent 47cd76ee91
commit d859bfedd3
2 changed files with 15 additions and 4 deletions

View File

@ -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;

View File

@ -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) {