mapbox / mapbox-navigation-ios-examples

A collection of examples showing off the Mapbox Navigation SDK.
https://github.com/mapbox/mapbox-navigation-ios
Other
58 stars 34 forks source link

Add example, which showcases `NavigationMapView` injection into `NavigationViewController`. #151

Open MaximAlien opened 2 years ago

MaximAlien commented 2 years ago

In scope of this ticket new example should be created, which shows how NavigationMapView injection into NavigationViewController can be performed.

MaximAlien commented 2 years ago

Depends on https://github.com/mapbox/mapbox-navigation-ios/issues/3576.

1ec5 commented 2 years ago

For context, this example would demonstrate usage of the NavigationOptions.navigationMapView property added in mapbox/mapbox-navigation-ios#3186. An application that implements its own route preview view controller (because of mapbox/mapbox-navigation-ios#808) can more seamlessly transition from it to NavigationViewController by specifying NavigationOptions.navigationMapView. NavigationViewController will embed the specified NavigationMapView and manipulate it as if it were the built-in map view.

There remain some rough edges. NavigationViewController doesn’t clean up its modifications to the map view once the trip ends: mapbox/mapbox-navigation-ios#3576. Also, it would be nice to offer some animation by default: mapbox/mapbox-navigation-ios#3288. But it should be straightforward for applications to work around these issues in the meantime.