From 0e39aad22c5679f37e5a2ab892c15cf196cd0873 Mon Sep 17 00:00:00 2001 From: Syed Mujeer Hashmi Date: Sun, 16 Dec 2018 23:30:57 +0530 Subject: 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 true mapmyindia https://apis.mapmyindia.com/advancedmaps/v1 YOUR_KeY %f Signed-off-by: Syed Mujeer Hashmi --- test/org/traccar/geocoder/GeocoderTest.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') 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); + } } -- cgit v1.2.3