diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2012-08-19 22:16:12 +0400 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2012-08-19 22:16:12 +0400 |
commit | e7660ab714ee237ce080eaf14f5ab7f1997bea3f (patch) | |
tree | 1adbaee8db27325f3bfd99962484cc203c7743b4 /src/org/traccar/http | |
parent | b0b93983f5411ceffc649d44d55093b04ddf802a (diff) | |
parent | df91992080ee4db293e6f81882e95e72600d9bd8 (diff) | |
download | trackermap-server-e7660ab714ee237ce080eaf14f5ab7f1997bea3f.tar.gz trackermap-server-e7660ab714ee237ce080eaf14f5ab7f1997bea3f.tar.bz2 trackermap-server-e7660ab714ee237ce080eaf14f5ab7f1997bea3f.zip |
Merge branch 'master' of https://github.com/williamchitto/traccar into williamchitto-master
Conflicts:
pom.xml
src/org/traccar/Server.java
Diffstat (limited to 'src/org/traccar/http')
-rw-r--r-- | src/org/traccar/http/WebServer.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/org/traccar/http/WebServer.java b/src/org/traccar/http/WebServer.java index 5dfeabed2..853bff3de 100644 --- a/src/org/traccar/http/WebServer.java +++ b/src/org/traccar/http/WebServer.java @@ -147,14 +147,16 @@ public class WebServer { Iterator<Position> i = dataManager.getPositions(Long.valueOf(deviceId)).iterator(); while (i.hasNext()) { Position position = i.next(); - out.format("{'device_id':%d,'time':'%tF %tT','valid':%b,'latitude':%f,'longitude':%f,'speed':%f,'course':%f}", + out.format("{'device_id':%d,'time':'%s','valid':%b,'latitude':%s,'longitude':%s,'speed':%s,'course':%s,'mode':%d,'address':'%s'}", position.getDeviceId(), - position.getTime(), position.getTime(), + position.getTimeFormated(), position.getValid(), - position.getLatitude(), - position.getLongitude(), - position.getSpeed(), - position.getCourse()); + position.getLatitude().toString(), + position.getLongitude().toString(), + position.getSpeed().toString(), + position.getCourse().toString(), + position.getMode(), + position.getAddress()); if (i.hasNext()) out.print(","); } } |