diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-15 10:56:23 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-15 10:56:23 +1300 |
commit | e8f5028cab5d95792c9df34824b7c76bfa9c6222 (patch) | |
tree | bf36c7dea39d26663a144362cb7cd8212b8fad9b /src/org/traccar/Context.java | |
parent | 0a1019b59481b6bf8ee8989feb23cef084b6caf5 (diff) | |
download | trackermap-server-e8f5028cab5d95792c9df34824b7c76bfa9c6222.tar.gz trackermap-server-e8f5028cab5d95792c9df34824b7c76bfa9c6222.tar.bz2 trackermap-server-e8f5028cab5d95792c9df34824b7c76bfa9c6222.zip |
Support key for Google geocoder (fix #1781)
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 55561b921..e87f78d20 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -148,7 +148,11 @@ public final class Context { reverseGeocoder = new FactualReverseGeocoder(url, key, cacheSize); break; default: - reverseGeocoder = new GoogleReverseGeocoder(cacheSize); + if (key != null) { + reverseGeocoder = new GoogleReverseGeocoder(key, cacheSize); + } else { + reverseGeocoder = new GoogleReverseGeocoder(cacheSize); + } break; } } |