aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-15 20:31:52 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-15 20:31:52 +1300
commited44b99c9decb2f56df821d642bbc511e7d90eaa (patch)
tree2c17aa7a2f799812523075f33456f84f4c9825f9 /test/org
parent6ed2b3884d36ab133d9501983cd00bbe46fe4393 (diff)
downloadtrackermap-server-ed44b99c9decb2f56df821d642bbc511e7d90eaa.tar.gz
trackermap-server-ed44b99c9decb2f56df821d642bbc511e7d90eaa.tar.bz2
trackermap-server-ed44b99c9decb2f56df821d642bbc511e7d90eaa.zip
Support language for Google geocoder
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/geocoder/GeocoderTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/org/traccar/geocoder/GeocoderTest.java b/test/org/traccar/geocoder/GeocoderTest.java
index 012f8bacd..60e415846 100644
--- a/test/org/traccar/geocoder/GeocoderTest.java
+++ b/test/org/traccar/geocoder/GeocoderTest.java
@@ -10,7 +10,7 @@ public class GeocoderTest {
@Test
public void test() throws InterruptedException {
if (enable) {
- testGeocodeFarm();
+ testGoogle();
}
}
@@ -31,9 +31,9 @@ public class GeocoderTest {
}
public void testGoogle() throws InterruptedException {
- Geocoder geocoder = new GoogleGeocoder();
+ Geocoder geocoder = new GoogleGeocoder(null, null, 0);
- geocoder.getAddress(new AddressFormat(), 37.4217550, -122.0846330, new Geocoder.ReverseGeocoderCallback() {
+ geocoder.getAddress(new AddressFormat(), 31.776797, 35.211489, new Geocoder.ReverseGeocoderCallback() {
@Override
public void onSuccess(String address) {
setAddress(address);
@@ -43,11 +43,11 @@ public class GeocoderTest {
public void onFailure(Throwable e) {
}
});
- Assert.assertEquals("1600 Amphitheatre Pkwy, Mountain View, CA, US", waitAddress());
+ Assert.assertEquals("1 Ibn Shaprut St, Jerusalem, Jerusalem District, IL", waitAddress());
}
public void testNominatim() throws InterruptedException {
- Geocoder geocoder = new NominatimGeocoder();
+ Geocoder geocoder = new NominatimGeocoder(null, null, 0);
geocoder.getAddress(new AddressFormat(), 40.7337807, -73.9974401, new Geocoder.ReverseGeocoderCallback() {
@Override
@@ -96,7 +96,7 @@ public class GeocoderTest {
}
public void testGeocodeFarm() throws InterruptedException {
- Geocoder geocoder = new GeocodeFarmGeocoder(0);
+ Geocoder geocoder = new GeocodeFarmGeocoder(null, 0);
geocoder.getAddress(new AddressFormat(), 34.116302, -118.051519, new Geocoder.ReverseGeocoderCallback() {
@Override