aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/location
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-17 20:39:57 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-12-17 20:40:12 +1300
commitf8280619a39cd05106b58b7198a99fd724d9b482 (patch)
tree1363007da62e51354327be3faa52fa42aca908b5 /src/org/traccar/location
parent98133819e0ea1b3126f142026aac1f624d2b1497 (diff)
downloadtrackermap-server-f8280619a39cd05106b58b7198a99fd724d9b482.tar.gz
trackermap-server-f8280619a39cd05106b58b7198a99fd724d9b482.tar.bz2
trackermap-server-f8280619a39cd05106b58b7198a99fd724d9b482.zip
Add support for Mozilla API key
Diffstat (limited to 'src/org/traccar/location')
-rw-r--r--src/org/traccar/location/MozillaLocationProvider.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/org/traccar/location/MozillaLocationProvider.java b/src/org/traccar/location/MozillaLocationProvider.java
index 37040a95e..cbfc19550 100644
--- a/src/org/traccar/location/MozillaLocationProvider.java
+++ b/src/org/traccar/location/MozillaLocationProvider.java
@@ -25,15 +25,17 @@ import javax.json.JsonReader;
public class MozillaLocationProvider extends BaseLocationProvider {
+ private static final String URL = "https://location.services.mozilla.com/v1/geolocate";
+
private String url;
private String template;
public MozillaLocationProvider() {
- this("https://location.services.mozilla.com/v1/geolocate", "test");
+ this("test");
}
- public MozillaLocationProvider(String url, String key) {
- this.url = url + "?key=" + key;
+ public MozillaLocationProvider(String key) {
+ this.url = URL + "?key=" + key;
template = new StringBuilder()
.append("{\"cellTowers\":[{")