Skip to content

Commit

Permalink
Merge branch 'main' into NAVIOS-1547
Browse files Browse the repository at this point in the history
  • Loading branch information
kried authored Feb 16, 2024
2 parents e8cd2de + fb0a314 commit 86a2748
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 5 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

Expand All @@ -48,6 +48,6 @@ jobs:
/usr/bin/xcodebuild build -project /Users/runner/work/mapbox-navigation-ios/mapbox-navigation-ios/MapboxNavigation-SPM.xcodeproj -target Example CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* Added PrivacyInfo.xcprivacy support. ([#4573](https://github.com/mapbox/mapbox-navigation-ios/pull/4573))
* Removed `NavigationEventsManager.init(activeNavigationDataSource:passiveNavigationDataSource:accessToken:mobileEventsManager:)` in favor of `NavigationEventsManager.init(activeNavigationDataSource:passiveNavigationDataSource:accessToken:)`. ([#4572](https://github.com/mapbox/mapbox-navigation-ios/pull/4572))
* Fixed a rare issue that could lead to memory corruption under specific conditions. This was resolved by replacing the internal image downloader with brand new actor-based implementation. ([#4588](https://github.com/mapbox/mapbox-navigation-ios/pull/4588))
* Fixed the possible situation when the upcoming route leg is rendered above the active route leg. ([#4588](https://github.com/mapbox/mapbox-navigation-ios/pull/4588))

## v2.17.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ extension NavigationMapView {
return self.congestionColor(for: nil, isMain: isMain)
}
}
return self.routeCasingColor

return .clear
}
})

Expand Down
21 changes: 21 additions & 0 deletions Tests/MapboxNavigationTests/NavigationMapViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,27 @@ class NavigationMapViewTests: TestCase {
XCTAssertEqual(routeLineGradient[0.0], navigationMapView.trafficLowColor)
}

func testGenerateRouteLineGradientWithMultilegRoute() {
let coordinates: [CLLocationCoordinate2D] = [
CLLocationCoordinate2D(latitude: 37.798, longitude: -122.398),
CLLocationCoordinate2D(latitude: 37.795, longitude: -122.398),
CLLocationCoordinate2D(latitude: 37.795, longitude: -122.395),
]
let congestionSegment: CongestionSegment = (coordinates, CongestionLevel.low)
var feature = Feature(geometry: .lineString(LineString(congestionSegment.0)))
feature.properties = [
CongestionAttribute: .string(String(describing: congestionSegment.1)),
CurrentLegAttribute: false
]
let congestionFeatures = [feature]

let routeLineGradient = navigationMapView.routeLineCongestionGradient(congestionFeatures: congestionFeatures,
isMain: true,
isSoft: false)
XCTAssertEqual(routeLineGradient.count, 1)
XCTAssertEqual(routeLineGradient[0.0], .clear)
}

func testGenerateRouteLineRestrictedGradient() {
let coordinates: [CLLocationCoordinate2D] = [
CLLocationCoordinate2D(latitude: 1, longitude: 0),
Expand Down

0 comments on commit 86a2748

Please sign in to comment.