aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geocoder/NominatimGeocoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/geocoder/NominatimGeocoder.java')
-rw-r--r--src/org/traccar/geocoder/NominatimGeocoder.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/org/traccar/geocoder/NominatimGeocoder.java b/src/org/traccar/geocoder/NominatimGeocoder.java
index 4f33468fd..051727e93 100644
--- a/src/org/traccar/geocoder/NominatimGeocoder.java
+++ b/src/org/traccar/geocoder/NominatimGeocoder.java
@@ -19,7 +19,7 @@ import javax.json.JsonObject;
public class NominatimGeocoder extends JsonGeocoder {
- private static String formatUrl(String url, String key) {
+ private static String formatUrl(String url, String key, String language) {
if (url == null) {
url = "http://nominatim.openstreetmap.org/reverse";
}
@@ -27,11 +27,14 @@ public class NominatimGeocoder extends JsonGeocoder {
if (key != null) {
url += "&key=" + key;
}
+ if (language != null) {
+ url += "&accept-language=" + language;
+ }
return url;
}
- public NominatimGeocoder(String url, String key, int cacheSize) {
- super(formatUrl(url, key), cacheSize);
+ public NominatimGeocoder(String url, String key, String language, int cacheSize) {
+ super(formatUrl(url, key, language), cacheSize);
}
@Override