aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-21 10:07:27 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-21 10:07:27 +1200
commit87f6ffa67c2cd4b3e7ce72ed7257ea15526c0052 (patch)
tree0ed5252d622cdc0ae6d71306ee70afa539de3c9c /src/org/traccar/Context.java
parentccaea63b14e67ae97bef2a0c826337dc3fa4e509 (diff)
downloadtrackermap-server-87f6ffa67c2cd4b3e7ce72ed7257ea15526c0052.tar.gz
trackermap-server-87f6ffa67c2cd4b3e7ce72ed7257ea15526c0052.tar.bz2
trackermap-server-87f6ffa67c2cd4b3e7ce72ed7257ea15526c0052.zip
Implement geocoder address caching
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;
}
}