GetTravelDirections (Legacy)
GetTravelDirections returns routing information for a set of two distinct points or for multiple points. It takes a starting latitude and longitude point and an ending latitude and longitude point as input and returns the route that is either fastest or shortest, depending on how you configure the stage.
Each country has its own database, named in this format: Spectrum Spatial Routing - <Country>. Each database also has its own country code. For example, the name of the Austrian database is "Spectrum Spatial Routing - Austria," and the Austrian batch country code is "A1T." Each database requires a separate license.
GetTravelDirections is part of Spectrum Spatial Routing.
Resource URL
http://server:port/soap/GetTravelDirections
https://OnDemandServer/soap/GetTravelDirections
For a list of Spectrum OnDemand servers, see ../../../OnDemand/source/GettingStarted/AccessingServices.dita.
Example
The following shows a SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:get="http://<server>:<port>/spectrum/services/GetTravelDirections"
xmlns:typ="http://www.g1.com/services/erm/types">
<soapenv:Header/>
<soapenv:Body>
<get:GetTravelDirectionsRequest>
<get:input_port>
<get:PointToPointRequest>
<get:RoutePoints>
<get:RoutePoint>
<get:Latitude>33.751748</get:Latitude>
<get:Longitude>-84.364014</get:Longitude>
</get:RoutePoint>
<get:RoutePoint>
<get:Latitude>33.664925</get:Latitude>
<get:Longitude>-80.90332</get:Longitude>
</get:RoutePoint>
</get:RoutePoints>
</get:PointToPointRequest>
</get:input_port>
</get:GetTravelDirectionsRequest>
</soapenv:Body>
</soapenv:Envelope>
This would be the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns6:GetTravelDirectionsResponse
xmlns:ns2="http://spectrum.precisely.com/"
xmlns:ns3="http://www.g1.com/services/erm/types"
xmlns:ns4="http://www.g1.com/services/GetTravelDirections"
xmlns:ns5="http://www.mapinfo.com/midev/service/geometries/v1"
xmlns:ns6="http://<server>:<port>/spectrum/services/GetTravelDirections">
<ns6:output_port>
<ns6:PointToPointResponse>
<ns6:Time>215.82</ns6:Time>
<ns6:TimeUnits>Minutes</ns6:TimeUnits>
<ns6:Distance>218.441</ns6:Distance>
<ns6:DistanceUnits>Miles</ns6:DistanceUnits>
<ns6:Format>Normal</ns6:Format>
<ns6:Language>en</ns6:Language>
<ns6:RouteDirections>
<ns6:RouteDirection>
<ns6:Instruction/>
<ns6:Time>0.03</ns6:Time>
<ns6:TimeUnits>Minutes</ns6:TimeUnits>
<ns6:Distance>0.013</ns6:Distance>
<ns6:DistanceUnits>Miles</ns6:DistanceUnits>
</ns6:RouteDirection>
<ns6:RouteDirection>
<ns6:Instruction>Turn left on Short St SE and travel South 0.10 mi (0.3 min).</ns6:Instruction>
<ns6:Time>0.28</ns6:Time>
<ns6:TimeUnits>Minutes</ns6:TimeUnits>
<ns6:Distance>0.099</ns6:Distance>
<ns6:DistanceUnits>Miles</ns6:DistanceUnits>
</ns6:RouteDirection>
...
<ns6:RouteDirection>
<ns6:Instruction>Turn left on Un-named street and travel East 0.11 mi (0.2 min).</ns6:Instruction>
<ns6:Time>0.2</ns6:Time>
<ns6:TimeUnits>Minutes</ns6:TimeUnits>
<ns6:Distance>0.105</ns6:Distance>
<ns6:DistanceUnits>Miles</ns6:DistanceUnits>
</ns6:RouteDirection>
<ns6:RouteDirection>
<ns6:Instruction>Turn right to reach your destination to the East.</ns6:Instruction>
<ns6:Time>0.33</ns6:Time>
<ns6:TimeUnits>Minutes</ns6:TimeUnits>
<ns6:Distance>0.167</ns6:Distance>
<ns6:DistanceUnits>Miles</ns6:DistanceUnits>
</ns6:RouteDirection>
</ns6:RouteDirections>
<ns6:user_fields/>
</ns6:PointToPointResponse>
</ns6:output_port>
</ns6:GetTravelDirectionsResponse>
</soap:Body>
</soap:Envelope>