0

How to direction multipoint vie Google Direction API.I only get between two point used that:

 public String request(LatLng start, LatLng end, String mode) {
    String url = "http://maps.googleapis.com/maps/api/directions/xml?origin=" + start.latitude + "," + start.longitude + "&destination=" + end.latitude + "," + end.longitude + "&sensor=false&units=metric&mode=" + mode;
    if(this.isLogging) {
        Log.i("GoogleDirection", "URL : " + url);
    }

    (new GoogleDirection.RequestTask((GoogleDirection.RequestTask)null)).execute(new String[]{url});
    return url;
}

How to get between multipoint ? help me .Thanks!

  • What is `multipoint` means? You wanna add a middle point? If so, just divide it into two steps for that. If you wanna have a multi route, you can refer to [here](http://stackoverflow.com/questions/19290593/displaying-multiple-routes-using-directions-api-in-android). – bjiang Oct 27 '15 at 23:22
  • i had a Array LatLong and i want draw route betwen this( multil point from array ). how do this? – Android Wind Oct 28 '15 at 01:34
  • So in this case, you just wanna draw a polyline based on your array of `latlag` so you don't need to use `direction api` just draw a line, please take look [this](https://developers.google.com/android/reference/com/google/android/gms/maps/model/Polyline) – bjiang Oct 28 '15 at 17:51
  • thanks you. I can do it! – Android Wind Oct 29 '15 at 01:51

0 Answers0