aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geocoder/OpenCageGeocoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/geocoder/OpenCageGeocoder.java')
-rw-r--r--src/org/traccar/geocoder/OpenCageGeocoder.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/geocoder/OpenCageGeocoder.java b/src/org/traccar/geocoder/OpenCageGeocoder.java
index 894397ee3..c21d5562a 100644
--- a/src/org/traccar/geocoder/OpenCageGeocoder.java
+++ b/src/org/traccar/geocoder/OpenCageGeocoder.java
@@ -33,6 +33,9 @@ public class OpenCageGeocoder extends JsonGeocoder {
if (location != null) {
Address address = new Address();
+ if (result.getJsonObject(0).containsKey("formatted")) {
+ address.setFormattedAddress(result.getJsonObject(0).getString("formatted"));
+ }
if (location.containsKey("building")) {
address.setHouse(location.getString("building"));
}