From 6adc560279b80e551e8341df9b8643ff4c46efd0 Mon Sep 17 00:00:00 2001 From: Stefaan Van Dooren Date: Wed, 23 Sep 2015 09:25:03 +0200 Subject: Added MapQuest --- src/org/traccar/Context.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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; } } -- cgit v1.2.3