Simple multi-address route requests must contain at least three locations, including a required <start_location> element. Multi-address route requests must also contain one or more <location> elements, and optionally an <end_location> element.
The result of a simple multi-address route request is a single route from the start location, through each intermediate location, to the end location. This single route consists of multiple subroutes. Subroutes are the routes between each of the individual locations.
In a simple multi-address route request, the optimize_route attribute must be absent or set to FALSE. In simple multi-address route requests, all locations are fixed. There is no attempt to optimize the order in which the locations are visited. The locations in the route are visited in the order in which they were specified in the request.
Simple multi-address route requests use the route_type attribute to classify the route as an open or closed tour:
Open tour: The route ends at the final intermediate location or a specified end location.
Closed tour: The route returns to the start location.
If a simple multi-address closed tour route is requested, the <start_location> element specification also used as the end location during route computation. If an <end_location> element is specified in a simple multi-address closed tour route request, an error is returned.
Example: Simple Multi-address Open Tour Route Request
Assume you want to drive from your workplace to customer A, then to customer B, and then to customer C.
The route request has your workplace as the start location, customers A and B as intermediate locations, and customer C as the end location.
The returned route has three subroutes: (1) workplace to customer A, (2) customer A to customer B, and (3) customer B to customer C.
Each subroute probably has multiple segments, each one associated with a specific driving direction step.
Example: Simple Multi-address Closed Tour Route Request
Assume you want to drive from your workplace to customer A, then to customer B, then to customer C, and then back to your workplace.
The route request has your workplace as the start location, and customers A, B, and C as intermediate locations. Your workplace is also used as the end location. An <end_location> element .should not be specified in the route request. The routing engine adds the subroute from customer C to the workplace automatically when it sees a request for a closed tour.
The returned route has four subroutes: (1) workplace to customer A, (2) customer A to customer B, (3) customer B to customer C, and (4) customer C back to the workplace.
Each subroute probably has multiple segments, each one associated with a specific driving direction step.
Simple multi-address requests can contain several attributes specific to each subroute. These attributes include return_subroutes, return_subroute_edge_ids, and return_subroute_geometry. These attributes are explained in Route Request XML Schema Definition.