aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-06-24 16:10:33 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2012-06-24 16:10:33 +0400
commit3baeb26089a65ea7b65beedf2f3157dc2aab33a2 (patch)
treedb50048c38a38a5ace5add7dd81bc465955ad43a /src/org/traccar/model
parent7a7c38268e09a67134b34a0a8e4fcba4f8bf639a (diff)
downloadtrackermap-server-3baeb26089a65ea7b65beedf2f3157dc2aab33a2.tar.gz
trackermap-server-3baeb26089a65ea7b65beedf2f3157dc2aab33a2.tar.bz2
trackermap-server-3baeb26089a65ea7b65beedf2f3157dc2aab33a2.zip
Add reverse geocoding (fix #15)
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/DatabaseDataManager.java1
-rw-r--r--src/org/traccar/model/Position.java19
2 files changed, 17 insertions, 3 deletions
diff --git a/src/org/traccar/model/DatabaseDataManager.java b/src/org/traccar/model/DatabaseDataManager.java
index 8235a6170..f312c3dcd 100644
--- a/src/org/traccar/model/DatabaseDataManager.java
+++ b/src/org/traccar/model/DatabaseDataManager.java
@@ -229,6 +229,7 @@ public class DatabaseDataManager implements DataManager {
queryAddPosition.setDouble("speed", position.getSpeed());
queryAddPosition.setDouble("course", position.getCourse());
queryAddPosition.setDouble("power", position.getPower());
+ queryAddPosition.setString("address", position.getAddress());
queryAddPosition.setString("extended_info", position.getExtendedInfo());
queryAddPosition.executeUpdate();
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index d2de726b1..b408dbbf2 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -26,7 +26,7 @@ public class Position {
* Id
*/
private Long id;
-
+
public Long getId() {
return id;
}
@@ -99,12 +99,12 @@ public class Position {
public void setLongitude(Double longitude) {
this.longitude = longitude;
}
-
+
/**
* Altitude
*/
private Double altitude;
-
+
public Double getAltitude() {
return altitude;
}
@@ -153,6 +153,19 @@ public class Position {
}
/**
+ * Address
+ */
+ private String address;
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ /**
* Extended information in XML format
*/
private String extendedInfo;