Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove excessive logging from Intersection. #538

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "5.9.0"
github "AliSoftware/OHHTTPStubs" "9.1.0"
github "Udumft/SwiftCLI" "da19d2a16cd5aa838d8fb7256e28c171bc67dd82"
github "mapbox/mapbox-events-ios" "v0.10.7"
github "mapbox/mapbox-events-ios" "v0.10.8"
github "mapbox/turf-swift" "v2.0.0-alpha.3"
github "raphaelmor/Polyline" "v5.0.2"
12 changes: 7 additions & 5 deletions Sources/MapboxDirections/Intersection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -260,20 +260,22 @@ extension Intersection: Codable {
try container.encode(outletArray, forKey: .outletIndexes)

var lanes: [Lane]?
print("lanes: \(String(describing: lanes))")
if let approachLanes = approachLanes,
let usableApproachLanes = usableApproachLanes,
let preferredApproachLanes = preferredApproachLanes
{
lanes = approachLanes.map { Lane(indications: $0) }
for i in usableApproachLanes {
lanes![i].isValid = true
if usableLaneIndication != nil && lanes![i].indications.descriptions.contains(usableLaneIndication!.rawValue) {
lanes![i].validIndication = usableLaneIndication
lanes?[i].isValid = true
if let usableLaneIndication = usableLaneIndication,
let validLanes = lanes,
validLanes[i].indications.descriptions.contains(usableLaneIndication.rawValue) {
lanes?[i].validIndication = usableLaneIndication
}
}

for j in preferredApproachLanes {
lanes![j].isActive = true
lanes?[j].isActive = true
}
}
try container.encodeIfPresent(lanes, forKey: .lanes)
Expand Down