diff options
author | Ed Freyfogle <freyfogle@users.noreply.github.com> | 2022-03-24 11:30:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 11:30:08 +0100 |
commit | eef38a4bf97a29873e29972b8f1fc7cdc4f9e927 (patch) | |
tree | c5775554613e8221a8eb23a1715c822948af1c96 /src/main | |
parent | be44289a93399b74a53797d992d994f7df6187d2 (diff) | |
download | trackermap-server-eef38a4bf97a29873e29972b8f1fc7cdc4f9e927.tar.gz trackermap-server-eef38a4bf97a29873e29972b8f1fc7cdc4f9e927.tar.bz2 trackermap-server-eef38a4bf97a29873e29972b8f1fc7cdc4f9e927.zip |
change if logic to be same as url test
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/geocoder/OpenCageGeocoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java b/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java index 18cf3a715..c4a82b03c 100644 --- a/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java +++ b/src/main/java/org/traccar/geocoder/OpenCageGeocoder.java @@ -26,10 +26,10 @@ public class OpenCageGeocoder extends JsonGeocoder { url = "https://api.opencagedata.com/geocode/v1"; } url += "/json?q=%f,%f&no_annotations=1&key=" + key; - if (language != null) { - url += "&language=" + language; - } else { + if (language == null) { url += "&language=en"; + } else { + url += "&language=" + language; } return url; } |