aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debug.xml2
-rw-r--r--src/org/traccar/ReverseGeocoderHandler.java8
2 files changed, 8 insertions, 2 deletions
diff --git a/debug.xml b/debug.xml
index 17cefadc4..43070f9ec 100644
--- a/debug.xml
+++ b/debug.xml
@@ -14,7 +14,7 @@
<entry key='web.path'>web</entry>
<entry key='web.debug'>true</entry>
- <entry key='geocoder.enable'>false</entry>
+ <entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>http://nominatim.openstreetmap.org/reverse</entry>
diff --git a/src/org/traccar/ReverseGeocoderHandler.java b/src/org/traccar/ReverseGeocoderHandler.java
index 298f59736..62f045c17 100644
--- a/src/org/traccar/ReverseGeocoderHandler.java
+++ b/src/org/traccar/ReverseGeocoderHandler.java
@@ -33,7 +33,13 @@ public class ReverseGeocoderHandler implements ChannelUpstreamHandler {
public ReverseGeocoderHandler(ReverseGeocoder geocoder, boolean processInvalidPositions) {
this.geocoder = geocoder;
this.processInvalidPositions = processInvalidPositions;
- addressFormat = new AddressFormat();
+
+ String formatString = Context.getConfig().getString("geocoder.format");
+ if (formatString != null) {
+ addressFormat = new AddressFormat(Context.getConfig().getString("geocoder.format"));
+ } else {
+ addressFormat = new AddressFormat();
+ }
}
@Override