aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/geocoder/HereGeocoder.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/geocoder/HereGeocoder.java b/src/main/java/org/traccar/geocoder/HereGeocoder.java
index 2010d360c..a204ddfab 100644
--- a/src/main/java/org/traccar/geocoder/HereGeocoder.java
+++ b/src/main/java/org/traccar/geocoder/HereGeocoder.java
@@ -20,14 +20,18 @@ import javax.json.JsonObject;
public class HereGeocoder extends JsonGeocoder {
private static String formatUrl(String url, String id, String key, String language) {
- url += "?mode=retrieveAddresses&maxresults=1";
- url += "&prox=%f,%f,0";
- url += "&app_id=" + id;
- url += "&app_code=" + key;
- if (language != null) {
- url += "&language=" + language;
- }
- return url;
+ if (url == null) {
+ url = "https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json";
+ }
+ url += "?mode=retrieveAddresses&maxresults=1";
+ url += "&prox=%f,%f,0";
+ url += "&app_id=" + id;
+ url += "&app_code=" + key;
+ url += "&apiKey=" + key;
+ if (language != null) {
+ url += "&language=" + language;
+ }
+ return url;
}
public HereGeocoder(String url, String id, String key, String language,