aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/web/client/controller/MapController.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-09 20:37:55 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-09 20:37:55 +1300
commit49ea27fa064054d0bccb22b0ef6ed081f4835a92 (patch)
tree5a84cfcbc03103297f1f66415dd03533fc8e9aa0 /src/main/java/org/traccar/web/client/controller/MapController.java
parentf0b99fd68cb3b6b484d50c1f9ebc0e77997fd2dd (diff)
downloadetbsa-traccar-web-49ea27fa064054d0bccb22b0ef6ed081f4835a92.tar.gz
etbsa-traccar-web-49ea27fa064054d0bccb22b0ef6ed081f4835a92.tar.bz2
etbsa-traccar-web-49ea27fa064054d0bccb22b0ef6ed081f4835a92.zip
Remove old stuff
Diffstat (limited to 'src/main/java/org/traccar/web/client/controller/MapController.java')
-rw-r--r--src/main/java/org/traccar/web/client/controller/MapController.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/main/java/org/traccar/web/client/controller/MapController.java b/src/main/java/org/traccar/web/client/controller/MapController.java
deleted file mode 100644
index 8932050..0000000
--- a/src/main/java/org/traccar/web/client/controller/MapController.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.traccar.web.client.controller;
-
-import java.util.List;
-
-import org.traccar.web.client.Traccar;
-import org.traccar.web.client.view.MapPanel;
-import org.traccar.web.shared.model.Device;
-import org.traccar.web.shared.model.Position;
-
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.widgets.Canvas;
-
-public class MapController implements PanelController {
-
- private static final int UPDATE_INTERVAL = 10000;
-
- private final MapPanel mapPanel;
-
- private final Timer updateTimer;
-
- public MapController() {
- mapPanel = new MapPanel();
- updateTimer = new Timer() {
- @Override
- public void run() {
- update();
- }
- };
- update();
- }
-
- @Override
- public Canvas getView() {
- return mapPanel;
- }
-
- public void select(Device device) {
- mapPanel.select(device, true);
- }
-
- public void update() {
- updateTimer.cancel();
- Traccar.getDatabaseService().getLatestPositions(new AsyncCallback<List<Position>>() {
- @Override
- public void onSuccess(List<Position> result) {
- mapPanel.showPositions(result);
- updateTimer.schedule(UPDATE_INTERVAL);
- }
- @Override
- public void onFailure(Throwable caught) {
- updateTimer.schedule(UPDATE_INTERVAL);
- }
- });
- }
-
-}