aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 7b364d799..a25f2f65e 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -109,15 +109,16 @@ 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");
switch (type) {
case "google":
- reverseGeocoder = new GoogleReverseGeocoder();
+ reverseGeocoder = new GoogleReverseGeocoder(cacheSize);
break;
case "nominatim":
- reverseGeocoder = new NominatimReverseGeocoder(url);
+ reverseGeocoder = new NominatimReverseGeocoder(url, cacheSize);
break;
case "gisgraphy":
- reverseGeocoder = new GisgraphyReverseGeocoder(url);
+ reverseGeocoder = new GisgraphyReverseGeocoder(url, cacheSize);
break;
}
}