Dependencies: Java8+Maven The user can use controller to get the coordinates using the following endpoint
FYI: The following is a GET request
{BASE_URI}/directions?origin={startLat, startLong}&dest={endLat, endLog}
Heroku: https://maps-directions.herokuapp.com/directions?origin={startLat,startLong}&dest={endLat,endLog}
Eg: localhost:8080/directions?origin=12.93175,77.62872&dest=12.92662,77.63696
Heroku Eg: https://maps-directions.herokuapp.com/directions?origin=12.93175,77.62872&dest=12.92662,77.63696
(Include request-id in header for traceability)
The project is distributed in three sections:
- Configuring the maps SDK
- Getting the route using Directions API
- Playing with the legs.steps provided by google api to get the points
- Used JAVA SDK
- Setting up API: src/main/java/com/locus/maps/directions/config/GeoApiContextConfiguration.java
- Used standard Directions API as per Java SDK
- File: src/main/java/com/locus/maps/directions/services/MapService.java
- Used azimuth for calculating the bearing (for angling length)
- Used radian distancing to find points
- File: src/main/java/com/locus/maps/directions/services/DirectionService.java
- Used exception handling for Http Error code handling
- Used log4j for logging
- Configured RequestInterceptors along-with logback for logging request-id to all logs
- Added Zipkin libraries for distributed tracing in cloud.