aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorStefaan Van Dooren <stefaan.vandooren@gmail.com>2015-09-23 09:25:03 +0200
committerStefaan Van Dooren <stefaan.vandooren@gmail.com>2015-09-23 09:25:03 +0200
commit6adc560279b80e551e8341df9b8643ff4c46efd0 (patch)
tree030a1d43c48a461096839d39b1f3e95f3efcef21 /src/org
parent71ba938429cac187e5b0a449e2dd89c9885b4196 (diff)
downloadtrackermap-server-6adc560279b80e551e8341df9b8643ff4c46efd0.tar.gz
trackermap-server-6adc560279b80e551e8341df9b8643ff4c46efd0.tar.bz2
trackermap-server-6adc560279b80e551e8341df9b8643ff4c46efd0.zip
Added MapQuest
Diffstat (limited to 'src/org')
-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;
}
}