diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-30 12:00:36 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-30 12:00:36 +1300 |
commit | be088ea967dfe7d1a7de3ec824382afc92aab128 (patch) | |
tree | 874cf566bf0c8019803203045c0739bc42bb79fd | |
parent | eb8b9dac624fcbb68659c1d6edf33bdfae2038dc (diff) | |
download | traccar-server-be088ea967dfe7d1a7de3ec824382afc92aab128.tar.gz traccar-server-be088ea967dfe7d1a7de3ec824382afc92aab128.tar.bz2 traccar-server-be088ea967dfe7d1a7de3ec824382afc92aab128.zip |
Allow user to change address format
-rw-r--r-- | debug.xml | 2 | ||||
-rw-r--r-- | src/org/traccar/ReverseGeocoderHandler.java | 8 |
2 files changed, 8 insertions, 2 deletions
@@ -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 |