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