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

[Bug]: NavigationView fails to correctly display Map and Route

Open JanTG1 opened this issue 3 years ago • 3 comments

Mapbox Navigation SDK version

2.0.0

Steps to reproduce

I don't know how to reproduce the problem.

Expected behavior

When Starting Navigation, not only should the Navigation UI appear, the user should be at the correct location on the map and the route should be correctly displayed.

Actual behavior

The Route is displayed somewhere in the water (I assume at Long&Lat 1,1). Sometimes it won't correct at all, sometimes it will "redirect" after a few minutes and then start acting correctly (updating user position and displaying the route correctly).

Console keeps printing 2022-03-12 15:43:18.037201+0100 App[17590:4961328] Failed to convert UIImage 2022-03-12 15:43:18.037321+0100 App[17590:4961328] Location Error when creating location indicator layer: unexpectedType

after printing many other things

See Screenshot as an example (Ignore the black box). The ui being messed up is another issue.

IMG_AF13E5298965-1 .

Is this a one-time issue or a repeatable issue?

repeatable

JanTG1 avatar Mar 12 '22 14:03 JanTG1

Thank you for your report! Is this behavior happening during simulation?

jill-cardamon avatar Mar 15 '22 14:03 jill-cardamon

@jill-cardamon no it happens when running my App on my iPhone. It does not happen every time, pretty wierd. But everytime I start navigation and it does not happen, I see the "rerouting" popup. I am guessing it has to do with my gps position. But I should have great reception, I have all 5 bars of 5G where I am testing...

JanTG1 avatar Mar 15 '22 15:03 JanTG1

@JanTG1, can you share your code snippet that starts NavigationViewController? It seems that this issue might be caused by RouteOptions usage while creating an instance of NavigationViewController. If you can switch to NavigationRouteOptions usage instead it might solve your issue. Basic example can be found here: https://github.com/mapbox/mapbox-navigation-ios-examples/blob/main/Navigation-Examples/Examples/Basic.swift.

Also make sure that you're using RouteOptions.routeShapeFormat = .polyline6. polyline5 usage might cause this problem.

MaximAlien avatar Apr 15 '22 17:04 MaximAlien

@MaximAlien sorry for forgetting about this issue. It has not happend since, I have since started using NavigationRouteOptions, might have fixed it that way. Closing the issue!

JanTG1 avatar Aug 01 '23 17:08 JanTG1