aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-11-08 15:43:13 +0500
committerAbyss777 <abyss@fox5.ru>2017-11-08 15:43:13 +0500
commit404044342a9fc9891366fa4378b4b1330cbca6c3 (patch)
tree98a2bfc2b6998e006f874d30ee9976c68345fee1 /src/org/traccar/api
parent92f00d0da0dafd08ccf2a623406963e61fcde276 (diff)
downloadtrackermap-server-404044342a9fc9891366fa4378b4b1330cbca6c3.tar.gz
trackermap-server-404044342a9fc9891366fa4378b4b1330cbca6c3.tar.bz2
trackermap-server-404044342a9fc9891366fa4378b4b1330cbca6c3.zip
- Implement synchronous geocoding
- Implement retry geocoding for trips/stops reports - Implement API for revers geocoding
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r--src/org/traccar/api/resource/ServerResource.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/ServerResource.java b/src/org/traccar/api/resource/ServerResource.java
index 034a5c492..b803c3380 100644
--- a/src/org/traccar/api/resource/ServerResource.java
+++ b/src/org/traccar/api/resource/ServerResource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.sql.SQLException;
@@ -47,4 +48,10 @@ public class ServerResource extends BaseResource {
return Response.ok(entity).build();
}
+ @Path("geocoding")
+ @GET
+ public String geocode(@QueryParam("latitude") double latitude, @QueryParam("longitude") double longitude) {
+ return Context.getGeocoder().getAddress(latitude, longitude);
+ }
+
}