aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geocoder/GoogleGeocoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/geocoder/GoogleGeocoder.java')
-rw-r--r--src/org/traccar/geocoder/GoogleGeocoder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/geocoder/GoogleGeocoder.java b/src/org/traccar/geocoder/GoogleGeocoder.java
index 235ea9ea9..af9b58a90 100644
--- a/src/org/traccar/geocoder/GoogleGeocoder.java
+++ b/src/org/traccar/geocoder/GoogleGeocoder.java
@@ -46,6 +46,10 @@ public class GoogleGeocoder extends JsonGeocoder {
JsonObject result = (JsonObject) results.get(0);
JsonArray components = result.getJsonArray("address_components");
+ if (result.containsKey("formatted_address")) {
+ address.setFormattedAddress(result.getString("formatted_address"));
+ }
+
for (JsonObject component : components.getValuesAs(JsonObject.class)) {
String value = component.getString("short_name");