aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-23 19:48:44 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-23 19:48:44 +1200
commit2e1d36be1e21209926d01ea4fc32fd4925f7f9d6 (patch)
tree55bbb796f1d3bc0b33a788de798b044b6119a70a /src/org/traccar/Context.java
parent0141fdc9cd2d9074759aacbeca3136667c3cdf07 (diff)
parent6adc560279b80e551e8341df9b8643ff4c46efd0 (diff)
downloadtrackermap-server-2e1d36be1e21209926d01ea4fc32fd4925f7f9d6.tar.gz
trackermap-server-2e1d36be1e21209926d01ea4fc32fd4925f7f9d6.tar.bz2
trackermap-server-2e1d36be1e21209926d01ea4fc32fd4925f7f9d6.zip
Merge pull request #1421 from StefaanVanDooren/master
Merge MapQuest reverse geocoder
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index a25f2f65e..29e85a42c 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -24,6 +24,7 @@ import org.traccar.geocode.GisgraphyReverseGeocoder;
import org.traccar.geocode.GoogleReverseGeocoder;
import org.traccar.geocode.NominatimReverseGeocoder;
import org.traccar.geocode.ReverseGeocoder;
+import org.traccar.geocode.MapQuestReverseGeocoder;
import org.traccar.helper.Log;
import org.traccar.web.WebServer;
@@ -109,7 +110,8 @@ public class Context {
if (config.getBoolean("geocoder.enable")) {
String type = config.getString("geocoder.type", "google");
String url = config.getString("geocoder.url");
- int cacheSize = config.getInteger("geocoder.cacheSize");
+
+ int cacheSize = config.getInteger("geocoder.cacheSize");
switch (type) {
case "google":
reverseGeocoder = new GoogleReverseGeocoder(cacheSize);
@@ -120,6 +122,10 @@ public class Context {
case "gisgraphy":
reverseGeocoder = new GisgraphyReverseGeocoder(url, cacheSize);
break;
+ case "mapquest":
+ String key = config.getString("geocoder.key");
+ reverseGeocoder = new MapQuestReverseGeocoder(url, key, cacheSize);
+ break;
}
}