I am trying to prepare a following URL from java using com.google.maps
google library. I am not finding proper library methods to add waypoint. Please let me know how to add waypoints to google map api.
I am following below approach to add origins and destinations to GeoAPi context.
GeoApiContext context = new GeoApiContext();
context.setApiKey("AIzaSyDhhwfZgJv4DCVuX-RDuXLXfoHWL6FIPAw");
LatLng originLatLng = new LatLng(17.4366668,78.3982614);
LatLng destinationLatLng = new LatLng(17.42955,78.34171);
LatLng wayPoints = new LatLng(17.4477, 78.38264);
DirectionsResult result = DirectionsApi.newRequest(context)
.origin(originLatLng)
.destination(destinationLatLng)
.waypoints("17.44027,78.39431", "17.43149,78.38817")
.await();