From 1145dcad1f4cd257c9ce5cf946a98ecf6cada754 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Tue, 27 Apr 2021 10:02:24 +0100 Subject: [PATCH] change new name to continue --- routing/handler/osrm.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routing/handler/osrm.go b/routing/handler/osrm.go index b212f16..3bed950 100644 --- a/routing/handler/osrm.go +++ b/routing/handler/osrm.go @@ -109,6 +109,11 @@ func (o *OSRM) Directions(ctx context.Context, req *pb.DirectionsRequest, rsp *p }) } + action := step.Maneuver.Type + if action == "new name" { + action = "continue" + } + // set the directions for the route rsp.Directions = append(rsp.Directions, &pb.Direction{ Name: step.Name, @@ -122,7 +127,7 @@ func (o *OSRM) Directions(ctx context.Context, req *pb.DirectionsRequest, rsp *p Latitude: float64(step.Maneuver.Location.Lat()), Longitude: float64(step.Maneuver.Location.Lng()), }, - Action: step.Maneuver.Type, + Action: action, Direction: step.Maneuver.Modifier, }, Intersections: intersections,