mapbox-navigation-ios icon indicating copy to clipboard operation
mapbox-navigation-ios copied to clipboard

The center of userCourseView doesn't arrive at end waypoint

Open ShanMa1991 opened this issue 5 years ago • 4 comments

When the navigation ends, the center of the user location should be at the end waypoints, but the Example shows that the user location hasn't been updated after the arrival. It seems to be caused by the RouteController didn't update the user location at the navigation end.

puckView_End.png

/cc @mapbox/navigation-ios

ShanMa1991 avatar Oct 06 '20 17:10 ShanMa1991

It's similar to mapbox/mapbox-navigation-ios#2637 of the end of route problem. I'll close this issue.

ShanMa1991 avatar Oct 09 '20 01:10 ShanMa1991

There is one issue which leads to inability to place puck right on final destination (as it's shown on attached screenshot): since Navigation SDK checks whether routeState is equal to .complete state to end active guidance navigation and Navigation Native still provides changes in locations even after .complete state it causes shift is location update/vanishing route line rendering. For example:

2020-10-20 10:40:01.065908-0700 Example[8270:130263] location: CLLocationCoordinate2D(latitude: 37.77394499999999, longitude: -122.411412)
2020-10-20 10:40:01.066013-0700 Example[8270:130263] routeState: tracking
2020-10-20 10:40:02.085406-0700 Example[8270:130263] location: CLLocationCoordinate2D(latitude: 37.77397005081151, longitude: -122.41138022827771)
2020-10-20 10:40:02.085531-0700 Example[8270:130263] routeState: complete
2020-10-20 10:40:03.060982-0700 Example[8270:130263] location: CLLocationCoordinate2D(latitude: 37.77399667419176, longitude: -122.41134646206869)
2020-10-20 10:40:03.061071-0700 Example[8270:130263] routeState: complete
...
2020-10-20 10:40:09.058672-0700 Example[8270:130263] location: CLLocationCoordinate2D(latitude: 37.77415000000001, longitude: -122.411152)
2020-10-20 10:40:09.058929-0700 Example[8270:130263] routeState: complete
2020-10-20 10:40:10.062586-0700 Example[8270:130263] location: CLLocationCoordinate2D(latitude: 37.77415000000001, longitude: -122.411152)
2020-10-20 10:40:10.062837-0700 Example[8270:130263] routeState: complete

@SiarheiFedartsou, do you think it'd be possible for Navigator to send .complete state only for final destination coordinate and stop updating location afterwards?

MaximAlien avatar Oct 20 '20 17:10 MaximAlien

@SiarheiFedartsou, do you think it'd be possible for Navigator to send .complete state only for final destination coordinate and stop updating location afterwards?

Do you mean send .complete once and then start sending .invalid?

SiarheiFedartsou avatar Oct 21 '20 11:10 SiarheiFedartsou

@SiarheiFedartsou, not sure this will help us. I meant that routeState and location from navigator should be in sync. So in case if routeState is .complete navigator should stop sending any location changes. As you can see in logs there are still several location updates even after receiving .complete state.

MaximAlien avatar Oct 26 '20 23:10 MaximAlien