From 4557cf912fada1dc249333aa05215b0116b8ebab Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 13 Dec 2016 06:01:02 +1300 Subject: Add key support for Nominatim (fix #2620) --- src/org/traccar/geocode/NominatimReverseGeocoder.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/org/traccar/geocode') diff --git a/src/org/traccar/geocode/NominatimReverseGeocoder.java b/src/org/traccar/geocode/NominatimReverseGeocoder.java index 0fbeaef83..b393f6490 100644 --- a/src/org/traccar/geocode/NominatimReverseGeocoder.java +++ b/src/org/traccar/geocode/NominatimReverseGeocoder.java @@ -27,6 +27,10 @@ public class NominatimReverseGeocoder extends JsonReverseGeocoder { super(url + "?format=json&lat=%f&lon=%f&zoom=18&addressdetails=1", cacheSize); } + public NominatimReverseGeocoder(String url, String key, int cacheSize) { + super(url + "?format=json&lat=%f&lon=%f&zoom=18&addressdetails=1&key=" + key, cacheSize); + } + @Override public Address parseAddress(JsonObject json) { JsonObject result = json.getJsonObject("address"); -- cgit v1.2.3