title: How to request in roads api using snap to roads?
body: <p>i would like to use the roads api to get the distance of my currentlocation and add the list of Latlng in onLocationChanged and to snap a set of coordinates (approx 100~200 points) to roads and that will return a json to get the accurate distance of driving.</p>
  
  <p>-- i got a problem with path parameters the latitude and longitude is not populating in which join by this "|" but i got an error like. 
     ---This is my url</p>
  
  <pre><code>    protected String getSnapUrl(List&lt;LatLng&gt; pat_value) {
      String str_path = null;
  
      for (int x = 0; x &lt; pat_value.size(); x++) {
          str_path = "path=" + pat_value.get(x).latitude + "," + pat_value.get(x).longitude + "|";
          Log.e("path", "" + pat_value.get(x).latitude + "-" + pat_value.get(x).longitude);
      }
  
      String str_interpolate = "interpolate=true";
      String key = "key=google key";
      String parameters = str_path + "&amp;" + str_interpolate + "&amp;" + key;
      String output = "snapToRoads";
      String url = output + "?" + parameters;
  
      return url;
  }
  
  protected void snapToRoad() {
      SnapToRoadAsyncHttpClient.get(getSnapUrl(path), null, new JsonHttpResponseHandler() {
          @Override
          public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
              super.onSuccess(statusCode, headers, response);
              Log.e("snapToRoad", "" + response);
          }
  
          @Override
          public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {
              super.onFailure(statusCode, headers, throwable, errorResponse);
              Log.e("snapToRoadFail", "" + errorResponse + throwable);
          }
  
          @Override
          public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
              super.onFailure(statusCode, headers, responseString, throwable);
              Log.e("snapToRoadFail", "" + responseString + throwable);
          }
      });
  
  }
  </code></pre>
  
  <p>--Error snaptoroads error:400 message:path.</p>