Hello
How can I obtain paths of the individual trips returned by XTour.planTours? I'm primarily looking for a polyline or list of coordinates that I can convert to polyline and display on Google Maps. Or perhaps xServer offers a way to display that? Of course I mean real path that goes on a road, not airline.
Visualization of trips returned by XTour
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Visualization of trips returned by XTour
Hello Jakub,
for the required feature you need to act as follows:
Best regards,
Bernd
for the required feature you need to act as follows:
- Use xTour to determine the tours, trips and stop sequences of the orders/locations. This will help you to get the proper sequence of (x,y) coordinates from each stop but not the detailed polygon line
- Use xRoute2.calculateRoute and gather the detailed polygons of each partial trip or tour. This requires the resultfield.polyline=true. The RouteResponse object will then provide the polyline in a format specified by the RouteRequest.geometryOptions
- FInally you can display the polygon lines on a mapping framework (xServer.NET for .NET developers, LEAFLET or OPENLAYERS for JavaScript developers, ...) in combination with a mapping engine (e.g. PTV xMapServer).
Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...