none
Error:The route distance is too long to calculate a route. RRS feed

  • Question

  • Hi,

    I have several legs in my trip and when i calculate the distance, i am getting this error:

    Error: The route distance is too long to calculate a route.

    How do i fix this issue?

           legd.Waypoints = waypoints
    
                ' Make the calculate route request
                Dim RouteServiceInstance As New RouteService.RouteServiceClient("BasicHttpBinding_IRouteService")
                Dim routeResponse = RouteServiceInstance.CalculateRoute(legd)

    Thanks

    Wednesday, July 31, 2013 5:03 PM

Answers

  • First off make sure you have 25 or less waypoints in your route as that's the limit on the service. If the issue is with the size of the response you can adjust this in the web.config file so that the service can return large responses. Try the following:

    1. Open web.config.
    2. Look for a <binding> tag where the name attribute is BasicHttpBinding_IRouteService
    3. Change the value of the maxBufferSize and maxRecievedMessageSize attributes to 5000000.

    Alternatively look at using the Bing Maps REST services. They are much faster, have more options and are updated regularly. The Bing Maps SOAP services are a legacy service which hasn't been updated in over 3 years.


    http://rbrundritt.wordpress.com


    Thursday, August 1, 2013 12:47 PM

All replies

  • First off make sure you have 25 or less waypoints in your route as that's the limit on the service. If the issue is with the size of the response you can adjust this in the web.config file so that the service can return large responses. Try the following:

    1. Open web.config.
    2. Look for a <binding> tag where the name attribute is BasicHttpBinding_IRouteService
    3. Change the value of the maxBufferSize and maxRecievedMessageSize attributes to 5000000.

    Alternatively look at using the Bing Maps REST services. They are much faster, have more options and are updated regularly. The Bing Maps SOAP services are a legacy service which hasn't been updated in over 3 years.


    http://rbrundritt.wordpress.com


    Thursday, August 1, 2013 12:47 PM
  • Hi,

    The number of waypoints varies, but it is always less than 15.

    I changed the  maxBufferSize and maxRecievedMessageSize to the value you suggested. I still get teh same error.

    I will definitely take a look at Rest Services.


    Thanks

    Thursday, August 1, 2013 4:46 PM