| | 1 | | using Itinero.Routes; |
| | 2 | |
|
| | 3 | | namespace Itinero.Instructions; |
| | 4 | |
|
| | 5 | | /// <summary> |
| | 6 | | /// Extensions for route to generate turn-by-turn instructions. |
| | 7 | | /// </summary> |
| | 8 | | public static class RouteExtensions |
| | 9 | | { |
| | 10 | | /// <summary> |
| | 11 | | /// Configures an instruction generator to generate turn-by-turn instructions. |
| | 12 | | /// </summary> |
| | 13 | | /// <param name="route">The route.</param> |
| | 14 | | /// <param name="settings">The settings.</param> |
| | 15 | | /// <returns>A route and associated instructions.</returns> |
| | 16 | | public static IRouteAndBaseInstructions Instructions(this Route route, |
| | 17 | | RouteInstructionGeneratorSettings? settings = null) |
| 0 | 18 | | { |
| 0 | 19 | | settings ??= RouteInstructionGeneratorSettings.Default; |
| | 20 | |
|
| 0 | 21 | | var generator = new RouteInstructionGenerator(route, settings); |
| | 22 | |
|
| 0 | 23 | | return generator.Generate(); |
| 0 | 24 | | } |
| | 25 | | } |