aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/geocoder
diff options
context:
space:
mode:
authorSyed Mujeer Hashmi <mujeerhashmi@gmail.com>2018-12-16 23:30:57 +0530
committerSyed Mujeer Hashmi <mujeerhashmi@gmail.com>2018-12-18 20:19:55 +0530
commit0e39aad22c5679f37e5a2ab892c15cf196cd0873 (patch)
treed0480b169edc38a867d613c7ebd40823ce1af32c /test/org/traccar/geocoder
parent56d33dbe0e79789fc1ee78e3358c3531c2f16381 (diff)
downloadtrackermap-server-0e39aad22c5679f37e5a2ab892c15cf196cd0873.tar.gz
trackermap-server-0e39aad22c5679f37e5a2ab892c15cf196cd0873.tar.bz2
trackermap-server-0e39aad22c5679f37e5a2ab892c15cf196cd0873.zip
geocoder: Implement MapmyIndia Reverse geocoder
MapmyIndia reverse geocoding is very helpful for the Indian subcontinent, It's "distance from nearest POI" detail embedded in the formatted_address field of the response is quite impressive for the reports. The Confirgurations required to be added in the config file "traccar.xml" are <entry key='geocoder.enable'>true</entry> <entry key='geocoder.type'>mapmyindia</entry> <entry key="geocoder.url">https://apis.mapmyindia.com/advancedmaps/v1</entry> <entry key="geocoder.key">YOUR_KeY</entry> <entry key="geocoder.format">%f</entry> Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@gmail.com>
Diffstat (limited to 'test/org/traccar/geocoder')
-rw-r--r--test/org/traccar/geocoder/GeocoderTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/org/traccar/geocoder/GeocoderTest.java b/test/org/traccar/geocoder/GeocoderTest.java
index 42220cde1..85d9bf62f 100644
--- a/test/org/traccar/geocoder/GeocoderTest.java
+++ b/test/org/traccar/geocoder/GeocoderTest.java
@@ -78,4 +78,11 @@ public class GeocoderTest {
assertEquals("6 Avenue Gustave Eiffel, Paris, Île-de-France, FRA", address);
}
+ @Ignore
+ @Test
+ public void testMapmyIndia() {
+ Geocoder geocoder = new MapmyIndiaGeocoder("", "", 0, new AddressFormat("%f"));
+ String address = geocoder.getAddress(28.6129602407977, 77.2294557094574, null);
+ assertEquals("New Delhi, Delhi. 1 m from India Gate pin-110001 (India)", address);
+ }
}