aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geocode
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/geocode')
-rw-r--r--src/org/traccar/geocode/BingMapsReverseGeocoder.java4
-rw-r--r--src/org/traccar/geocode/FactualReverseGeocoder.java6
-rw-r--r--src/org/traccar/geocode/GoogleReverseGeocoder.java4
-rw-r--r--src/org/traccar/geocode/MapQuestReverseGeocoder.java10
-rw-r--r--src/org/traccar/geocode/NominatimReverseGeocoder.java2
-rw-r--r--src/org/traccar/geocode/OpenCageReverseGeocoder.java8
6 files changed, 17 insertions, 17 deletions
diff --git a/src/org/traccar/geocode/BingMapsReverseGeocoder.java b/src/org/traccar/geocode/BingMapsReverseGeocoder.java
index 6c79010c2..34c3e4922 100644
--- a/src/org/traccar/geocode/BingMapsReverseGeocoder.java
+++ b/src/org/traccar/geocode/BingMapsReverseGeocoder.java
@@ -37,10 +37,10 @@ public class BingMapsReverseGeocoder extends JsonReverseGeocoder {
Address address = new Address();
if (location.containsKey("addressLine")) {
address.setStreet(location.getString("addressLine"));
- }
+ }
if (location.containsKey("locality")) {
address.setSettlement(location.getString("locality"));
- }
+ }
if (location.containsKey("adminDistrict2")) {
address.setDistrict(location.getString("adminDistrict2"));
}
diff --git a/src/org/traccar/geocode/FactualReverseGeocoder.java b/src/org/traccar/geocode/FactualReverseGeocoder.java
index 9100301bb..8f32cf624 100644
--- a/src/org/traccar/geocode/FactualReverseGeocoder.java
+++ b/src/org/traccar/geocode/FactualReverseGeocoder.java
@@ -32,15 +32,15 @@ public class FactualReverseGeocoder extends JsonReverseGeocoder {
JsonObject result = json.getJsonObject("response").getJsonObject("data");
if (result != null) {
Address address = new Address();
- if (result.getJsonObject("street_number") != null) {
+ if (result.getJsonObject("street_number") != null) {
address.setHouse(result.getJsonObject("street_number").getString("name"));
}
if (result.getJsonObject("street_name") != null) {
address.setStreet(result.getJsonObject("street_name").getString("name"));
- }
+ }
if (result.getJsonObject("locality") != null) {
address.setSettlement(result.getJsonObject("locality").getString("name"));
- }
+ }
if (result.getJsonObject("county") != null) {
address.setDistrict(result.getJsonObject("county").getString("name"));
}
diff --git a/src/org/traccar/geocode/GoogleReverseGeocoder.java b/src/org/traccar/geocode/GoogleReverseGeocoder.java
index 667436cbe..ade49a38b 100644
--- a/src/org/traccar/geocode/GoogleReverseGeocoder.java
+++ b/src/org/traccar/geocode/GoogleReverseGeocoder.java
@@ -44,7 +44,7 @@ public class GoogleReverseGeocoder extends JsonReverseGeocoder {
String value = component.getString("short_name");
for (JsonString type : component.getJsonArray("types").getValuesAs(JsonString.class)) {
-
+
switch (type.getString()) {
case "street_number":
address.setHouse(value);
@@ -70,7 +70,7 @@ public class GoogleReverseGeocoder extends JsonReverseGeocoder {
default:
continue;
}
-
+
break;
}
}
diff --git a/src/org/traccar/geocode/MapQuestReverseGeocoder.java b/src/org/traccar/geocode/MapQuestReverseGeocoder.java
index a815ca40f..7141ea020 100644
--- a/src/org/traccar/geocode/MapQuestReverseGeocoder.java
+++ b/src/org/traccar/geocode/MapQuestReverseGeocoder.java
@@ -35,15 +35,15 @@ public class MapQuestReverseGeocoder extends JsonReverseGeocoder {
JsonArray locations = result.getJsonObject(0).getJsonArray("locations");
if (locations != null) {
JsonObject location = locations.getJsonObject(0);
-
+
Address address = new Address();
-
+
if (location.containsKey("street")) {
address.setStreet(location.getString("street"));
- }
+ }
if (location.containsKey("adminArea5")) {
address.setSettlement(location.getString("adminArea5"));
- }
+ }
if (location.containsKey("adminArea4")) {
address.setDistrict(location.getString("adminArea4"));
}
@@ -56,7 +56,7 @@ public class MapQuestReverseGeocoder extends JsonReverseGeocoder {
if (location.containsKey("postalCode")) {
address.setPostcode(location.getString("postalCode"));
}
-
+
return address;
}
}
diff --git a/src/org/traccar/geocode/NominatimReverseGeocoder.java b/src/org/traccar/geocode/NominatimReverseGeocoder.java
index 95dfdeeb2..763987eae 100644
--- a/src/org/traccar/geocode/NominatimReverseGeocoder.java
+++ b/src/org/traccar/geocode/NominatimReverseGeocoder.java
@@ -22,7 +22,7 @@ public class NominatimReverseGeocoder extends JsonReverseGeocoder {
public NominatimReverseGeocoder() {
this("http://nominatim.openstreetmap.org/reverse", 0);
}
-
+
public NominatimReverseGeocoder(String url, int cacheSize) {
super(url + "?format=json&lat=%f&lon=%f&zoom=18&addressdetails=1", cacheSize);
}
diff --git a/src/org/traccar/geocode/OpenCageReverseGeocoder.java b/src/org/traccar/geocode/OpenCageReverseGeocoder.java
index 72f9a0dc9..1ad4aaf91 100644
--- a/src/org/traccar/geocode/OpenCageReverseGeocoder.java
+++ b/src/org/traccar/geocode/OpenCageReverseGeocoder.java
@@ -38,13 +38,13 @@ public class OpenCageReverseGeocoder extends JsonReverseGeocoder {
if (location.containsKey("house_number")) {
address.setHouse(location.getString("house_number"));
- }
+ }
if (location.containsKey("road")) {
address.setStreet(location.getString("road"));
- }
+ }
if (location.containsKey("city_district")) {
address.setSettlement(location.getString("city_district"));
- }
+ }
if (location.containsKey("county")) {
address.setDistrict(location.getString("county"));
}
@@ -57,7 +57,7 @@ public class OpenCageReverseGeocoder extends JsonReverseGeocoder {
if (location.containsKey("postcode")) {
address.setPostcode(location.getString("postcode"));
}
-
+
return address;
}
}