From 42fc71093613a3033ba30c236513013b49b2774c Mon Sep 17 00:00:00 2001 From: xivk Date: Tue, 20 Aug 2024 13:56:09 +0200 Subject: [PATCH] Fixed route builder for start edge without shapes. --- Itinero.Common.props | 2 +- src/Itinero/Routes/Builders/RouteBuilder.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Itinero.Common.props b/Itinero.Common.props index 4c1760917..9605bc2fc 100644 --- a/Itinero.Common.props +++ b/Itinero.Common.props @@ -3,7 +3,7 @@ - 2.0.1-alpha-105 + 2.0.2-alpha-000 en Itinero - Routeplanning for .NET. Itinero BV diff --git a/src/Itinero/Routes/Builders/RouteBuilder.cs b/src/Itinero/Routes/Builders/RouteBuilder.cs index 07bf0f917..fd912395b 100644 --- a/src/Itinero/Routes/Builders/RouteBuilder.cs +++ b/src/Itinero/Routes/Builders/RouteBuilder.cs @@ -117,6 +117,11 @@ public Result Build(RoutingNetwork routingNetwork, Profile profile, Path route.Shape.Add(shapeBetween.Current); } + if (route.Shape.Count == 0) + { + route.Shape.Add(edgeEnumerator.LocationOnEdge(offset2)); + } + if (offset1 != 0 || offset2 != ushort.MaxValue) {