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

Fix #27: navigation puck falls off route when panning #53

Merged
merged 1 commit into from
Jun 11, 2024
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
6 changes: 3 additions & 3 deletions MapboxNavigation/NavigationMapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@
super.anchorPoint(forGesture: gesture)
}
}
override open func mapViewDidFinishRenderingFrameFullyRendered(_ fullyRendered: Bool) {
super.mapViewDidFinishRenderingFrameFullyRendered(fullyRendered)

override open func mapViewDidFinishRenderingFrameFullyRendered(_ fullyRendered: Bool, frameEncodingTime: Double, frameRenderingTime: Double) {
super.mapViewDidFinishRenderingFrameFullyRendered(fullyRendered, frameEncodingTime: frameEncodingTime, frameRenderingTime: frameRenderingTime)

guard self.shouldPositionCourseViewFrameByFrame else { return }
guard let location = userLocationForCourseTracking else { return }
Expand Down Expand Up @@ -740,7 +740,7 @@
}
}

// TODO: Change to point-based distance calculation

Check warning on line 743 in MapboxNavigation/NavigationMapView.swift

View workflow job for this annotation

GitHub Actions / Code Style

TODOs should be resolved (Change to point-based distance...) (todo)
private func waypoints(on routes: [Route], closeTo point: CGPoint) -> [Waypoint]? {
let tapCoordinate = convert(point, toCoordinateFrom: self)
let multipointRoutes = routes.filter { $0.routeOptions.waypoints.count >= 3 }
Expand Down
4 changes: 3 additions & 1 deletion MapboxNavigationObjc/MLNMapView+MLNNavigationAdditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

@interface MLNMapView (MLNNavigationAdditions)

- (void)mapViewDidFinishRenderingFrameFullyRendered:(BOOL)fullyRendered;
- (void)mapViewDidFinishRenderingFrameFullyRendered:(BOOL)fullyRendered
frameEncodingTime:(double)frameEncodingTime
frameRenderingTime:(double)frameRenderingTime;

@end
Loading