@@ -90,11 +90,15 @@ function RoutingResult({
9090 ? new RouteInfo ( )
9191 : getInfoFor ( path . points , path . details . mtb_rating , s => s > 1 )
9292
93- const privateOrDeliveryInfo = ApiImpl . isMotorVehicle ( profile )
93+ const privateInfo = ApiImpl . isMotorVehicle ( profile )
94+ ? getInfoFor ( path . points , path . details . road_access , s => s === 'private' )
95+ : new RouteInfo ( )
96+
97+ const deliveryEtcInfo = ApiImpl . isMotorVehicle ( profile )
9498 ? getInfoFor (
9599 path . points ,
96100 path . details . road_access ,
97- s => s === 'private ' || s === 'customers' || s === 'delivery '
101+ s => s === 'delivery ' || s === 'customers' || s === 'destination '
98102 )
99103 : new RouteInfo ( )
100104 const badTrackInfo = ! ApiImpl . isMotorVehicle ( profile )
@@ -125,7 +129,7 @@ function RoutingResult({
125129 accessCondInfo . distance > 0 ||
126130 footAccessCondInfo . distance > 0 ||
127131 bikeAccessCondInfo . distance > 0 ||
128- privateOrDeliveryInfo . distance > 0 ||
132+ privateInfo . distance > 0 ||
129133 trunkInfo . distance > 0 ||
130134 badTrackInfo . distance > 0 ||
131135 stepsInfo . distance > 0 ||
@@ -262,13 +266,26 @@ function RoutingResult({
262266 type = { 'private' }
263267 child = { < PrivateIcon /> }
264268 value = {
265- privateOrDeliveryInfo . distance > 0 &&
266- metersToShortText ( privateOrDeliveryInfo . distance , showDistanceInMiles )
269+ privateInfo . distance > 0 && metersToShortText ( privateInfo . distance , showDistanceInMiles )
267270 }
268271 selected = { selectedRH }
269- segments = { privateOrDeliveryInfo . segments }
272+ segments = { privateInfo . segments }
270273 values = { [ ] }
271274 />
275+ < RHButton
276+ setDescription = { b => setDescriptionRH ( b ) }
277+ description = { tr ( 'way_contains' , [ tr ( 'restricted_sections' ) ] ) }
278+ setType = { t => setSelectedRH ( t ) }
279+ type = { 'delivery_etc' }
280+ child = { < PrivateIcon /> }
281+ value = {
282+ deliveryEtcInfo . distance > 0 &&
283+ metersToShortText ( deliveryEtcInfo . distance , showDistanceInMiles )
284+ }
285+ selected = { selectedRH }
286+ segments = { deliveryEtcInfo . segments }
287+ values = { deliveryEtcInfo . values }
288+ />
272289 < RHButton
273290 setDescription = { b => setDescriptionRH ( b ) }
274291 description = { tr ( 'way_contains_toll' ) }
0 commit comments