Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private String getDirectionsUrl(LatLng origin,LatLng dest)
- {
- // Origin of route
- String str_origin = "origin="+origin.latitude+","+origin.longitude;
- // Destination of route
- String str_dest = "destination="+dest.latitude+","+dest.longitude;
- // Sensor enabled
- String sensor = "sensor=false";
- // Building the parameters to the web service
- String parameters = str_origin+"&"+str_dest+"&"+sensor+"&"+"mode="+mode;
- // Output format
- String output = "json";
- // Building the url to the web service
- url = "https://maps.googleapis.com/maps/api/directions/"+output+"?"+parameters;
- return url;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement