aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geocode/GoogleReverseGeocoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-15 10:56:23 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-15 10:56:23 +1300
commite8f5028cab5d95792c9df34824b7c76bfa9c6222 (patch)
treebf36c7dea39d26663a144362cb7cd8212b8fad9b /src/org/traccar/geocode/GoogleReverseGeocoder.java
parent0a1019b59481b6bf8ee8989feb23cef084b6caf5 (diff)
downloadtrackermap-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/geocode/GoogleReverseGeocoder.java')
-rw-r--r--src/org/traccar/geocode/GoogleReverseGeocoder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/geocode/GoogleReverseGeocoder.java b/src/org/traccar/geocode/GoogleReverseGeocoder.java
index f1c27c5d3..be863718b 100644
--- a/src/org/traccar/geocode/GoogleReverseGeocoder.java
+++ b/src/org/traccar/geocode/GoogleReverseGeocoder.java
@@ -29,6 +29,10 @@ public class GoogleReverseGeocoder extends JsonReverseGeocoder {
super("http://maps.googleapis.com/maps/api/geocode/json?latlng=%f,%f", cacheSize);
}
+ public GoogleReverseGeocoder(String key, int cacheSize) {
+ super("http://maps.googleapis.com/maps/api/geocode/json?latlng=%f,%f&key=" + key, cacheSize);
+ }
+
@Override
public Address parseAddress(JsonObject json) {
JsonArray results = json.getJsonArray("results");