-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RoadClasses restrictions violation. (#627)
* vk-843-excluded-roadclasses: added RouteResponse.roadClassViolations calculated property; Added RouteRoadClassesViolations struct to expose RoadClasses violations to user; Added RouteResponse.exclusionViolations(routeIndex:legIndex:stepIndex:intersectionIndex:) methods for searching; Unit test added; CHANGELOG updated.
- Loading branch information
Showing
6 changed files
with
18,776 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Sources/MapboxDirections/RoadClassExclusionViolation.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
import Foundation | ||
|
||
/** | ||
Exact `RoadClass` exclusion violation case. | ||
*/ | ||
public struct RoadClassExclusionViolation { | ||
/** | ||
`RoadClasses` that were violated at this point. | ||
*/ | ||
public var roadClasses: RoadClasses | ||
/** | ||
Index of a `Route` inside `RouteResponse` where violation occured. | ||
*/ | ||
public var routeIndex: Int | ||
/** | ||
Index of a `RouteLeg` inside `Route` where violation occured. | ||
*/ | ||
public var legIndex: Int | ||
/** | ||
Index of a `RouteStep` inside `RouteLeg` where violation occured. | ||
*/ | ||
public var stepIndex: Int | ||
/** | ||
Index of an `Intersection` inside `RouteStep` where violation occured. | ||
*/ | ||
public var intersectionIndex: Int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.