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.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 2cd1beecc..2b8860187 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -192,7 +192,11 @@ public final class Context {
int cacheSize = config.getInteger("geocoder.cacheSize");
switch (type) {
case "nominatim":
- reverseGeocoder = new NominatimReverseGeocoder(url, cacheSize);
+ if (key != null) {
+ reverseGeocoder = new NominatimReverseGeocoder(url, key, cacheSize);
+ } else {
+ reverseGeocoder = new NominatimReverseGeocoder(url, cacheSize);
+ }
break;
case "gisgraphy":
reverseGeocoder = new GisgraphyReverseGeocoder(url, cacheSize);