aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/geocode
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-06-29 10:37:58 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-06-29 10:37:58 +1200
commit615a80021e52e27adcffaa1d3fa2fd15f4e589b7 (patch)
treedd4564f3f4b970bd1caf86eccce5db3ce2f4574a /test/org/traccar/geocode
parentd71fe8f7c6a8e8dd86992842060ab6dbac8b12f4 (diff)
downloadtrackermap-server-615a80021e52e27adcffaa1d3fa2fd15f4e589b7.tar.gz
trackermap-server-615a80021e52e27adcffaa1d3fa2fd15f4e589b7.tar.bz2
trackermap-server-615a80021e52e27adcffaa1d3fa2fd15f4e589b7.zip
Support Geocode Farm reverse geocoder
Diffstat (limited to 'test/org/traccar/geocode')
-rw-r--r--test/org/traccar/geocode/ReverseGeocoderTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/org/traccar/geocode/ReverseGeocoderTest.java b/test/org/traccar/geocode/ReverseGeocoderTest.java
index ada0afbbe..2b0c30779 100644
--- a/test/org/traccar/geocode/ReverseGeocoderTest.java
+++ b/test/org/traccar/geocode/ReverseGeocoderTest.java
@@ -10,7 +10,7 @@ public class ReverseGeocoderTest {
@Test
public void test() throws InterruptedException {
if (enable) {
- testGoogle();
+ testGeocodeFarm();
}
}
@@ -79,4 +79,16 @@ public class ReverseGeocoderTest {
Assert.assertEquals("Charleston Road, California, US", waitAddress());
}
+ public void testGeocodeFarm() throws InterruptedException {
+ ReverseGeocoder reverseGeocoder = new GeocodeFarmReverseGeocoder(0);
+
+ reverseGeocoder.getAddress(new AddressFormat(), 34.116302, -118.051519, new ReverseGeocoder.ReverseGeocoderCallback() {
+ @Override
+ public void onResult(String address) {
+ setAddress(address);
+ }
+ });
+ Assert.assertEquals("Estrella Avenue, Arcadia, California, United States", waitAddress());
+ }
+
}