diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-13 06:01:02 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-13 06:01:02 +1300 |
commit | 4557cf912fada1dc249333aa05215b0116b8ebab (patch) | |
tree | 6eed953b738cd842dc91ecb7e61a473f31748284 /src/org/traccar/Context.java | |
parent | 0d23a4eb3ef7a84dbfba3bf55ed70f427ccfe02f (diff) | |
download | traccar-server-4557cf912fada1dc249333aa05215b0116b8ebab.tar.gz traccar-server-4557cf912fada1dc249333aa05215b0116b8ebab.tar.bz2 traccar-server-4557cf912fada1dc249333aa05215b0116b8ebab.zip |
Add key support for Nominatim (fix #2620)
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 6 |
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); |