Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. private String getUrl(LatLng origin, LatLng dest, String directionMode) {
  2.  
  3.         String str_origin = "origin=" + origin.latitude + "," + origin.longitude;
  4.  
  5.         String str_destination = "destination=" + dest.latitude + "," + dest.longitude;
  6.  
  7.         String mode = "mode=" + directionMode;
  8.  
  9.         String parameters = str_origin + "&" + str_destination + "&" + mode;
  10.  
  11.         String output = "json";
  12.  
  13.         String url = "https://maps.googleapis.com/maps/api/directions/" + output + "?" + parameters + "&key=" + "AIzaSyBbn1GtJKOrz0a4bwoqhhAOlBAlEqNSTEA";
  14.  
  15.         return url;
  16.  
  17.  
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement