aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/GeocoderHandler.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-11-11 09:21:45 +1300
committerGitHub <noreply@github.com>2017-11-11 09:21:45 +1300
commit204b1074ee57960775066c7c483d54bab8ebf279 (patch)
treebfec39fe84b547dac991f0d38cd69e9c64c688a6 /src/org/traccar/GeocoderHandler.java
parent92f00d0da0dafd08ccf2a623406963e61fcde276 (diff)
parent96d89e2e352f5cba70a346b1f71bfb3bd399556b (diff)
downloadtrackermap-server-204b1074ee57960775066c7c483d54bab8ebf279.tar.gz
trackermap-server-204b1074ee57960775066c7c483d54bab8ebf279.tar.bz2
trackermap-server-204b1074ee57960775066c7c483d54bab8ebf279.zip
Merge pull request #3632 from Abyss777/retry_geocoding
Retry geocoding for trips/stops
Diffstat (limited to 'src/org/traccar/GeocoderHandler.java')
-rw-r--r--src/org/traccar/GeocoderHandler.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/org/traccar/GeocoderHandler.java b/src/org/traccar/GeocoderHandler.java
index a211d1a23..6b55e8162 100644
--- a/src/org/traccar/GeocoderHandler.java
+++ b/src/org/traccar/GeocoderHandler.java
@@ -20,7 +20,6 @@ import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelUpstreamHandler;
import org.jboss.netty.channel.Channels;
import org.jboss.netty.channel.MessageEvent;
-import org.traccar.geocoder.AddressFormat;
import org.traccar.geocoder.Geocoder;
import org.traccar.helper.Log;
import org.traccar.model.Position;
@@ -29,20 +28,12 @@ public class GeocoderHandler implements ChannelUpstreamHandler {
private final Geocoder geocoder;
private final boolean processInvalidPositions;
- private final AddressFormat addressFormat;
private final int geocoderReuseDistance;
public GeocoderHandler(Geocoder geocoder, boolean processInvalidPositions) {
this.geocoder = geocoder;
this.processInvalidPositions = processInvalidPositions;
- String formatString = Context.getConfig().getString("geocoder.format");
- if (formatString != null) {
- addressFormat = new AddressFormat(formatString);
- } else {
- addressFormat = new AddressFormat();
- }
-
geocoderReuseDistance = Context.getConfig().getInteger("geocoder.reuseDistance", 0);
}
@@ -70,7 +61,7 @@ public class GeocoderHandler implements ChannelUpstreamHandler {
Context.getStatisticsManager().registerGeocoderRequest();
- geocoder.getAddress(addressFormat, position.getLatitude(), position.getLongitude(),
+ geocoder.getAddress(position.getLatitude(), position.getLongitude(),
new Geocoder.ReverseGeocoderCallback() {
@Override
public void onSuccess(String address) {