Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void googleSample() throws Exception {
- GeoApiContext ctx = new GeoApiContext();
- ctx.setApiKey("AIzaSyApu75sD5ZG17luxoAOsZZtstiLnRe8f-0");
- DirectionsApiRequest req = DirectionsApi.getDirections(ctx,
- "Киев, Борщаговская 148",
- "блаблабла"//"Киев, Бориспольськая 10"
- );
- DirectionsRoute[] routes = req.await();
- for (DirectionsRoute route : routes) {
- System.out.println(route.summary);
- for (DirectionsLeg leg : route.legs) {
- System.out.println(leg.distance);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement