aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/GeocoderHandler.java
diff options
context:
space:
mode:
authorShinryuken <watertext@hotmail.it>2017-11-19 11:22:31 +0100
committerGitHub <noreply@github.com>2017-11-19 11:22:31 +0100
commita5b273f8f8afd1a67613517c6487642601070456 (patch)
treebabc63f5d50977fc91b3946b1da2e86ec74c51a5 /src/org/traccar/GeocoderHandler.java
parentc7928ef4a722cb40e9911c8e76e308fc48c85567 (diff)
parentfb9cbb2b74dc0060bd0dc5d0b3bfeb958ed6f3b5 (diff)
downloadtrackermap-server-a5b273f8f8afd1a67613517c6487642601070456.tar.gz
trackermap-server-a5b273f8f8afd1a67613517c6487642601070456.tar.bz2
trackermap-server-a5b273f8f8afd1a67613517c6487642601070456.zip
Merge branch 'master' into payload-as-form-param
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) {