We were asked how to indicate the direction for a route or a tour using the shape layer. We’ve built a sample for it which demonstrates two options:
1. Use a stroked MapPolyline and animate the StrokeDashOffset property. This technique is also used at the RoutingDemo of the demo center application.
2. Implement a custom MapShape which renders little arrows along the polyline. This technique is a little bit more complex, because you have to calculate the arrow coordinates by yourself. I’ve implemented an ArrowDashLine class which handles this.
Download application, x-zip-compressed::
- AdvancedLineStyles (zip file, 249 kilobytes)
- AdvancedLineStylesSrc (zip file, 260 kilobytes)
To indicate the directions of transports, you can also take a look at MapArrowDemo explained here.
For any questions please contact the PTV xServer Support Team.