You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't change user's current location annotation view #213
RouteMapViewController is the NavigationMapView’s delegate (conforming to MGLMapViewDelegate). Since a map view can’t have multiple delegates, we need to plumb some additional MGLMapViewDelegate methods through RouteMapViewControllerDelegate, NavigationViewController, and NavigationViewControllerDelegate.
In particular, MGLMapViewDelegate.mapView(_:viewFor:) needs to be exposed as NavigationViewControllerDelegate.navigationViewController(_:mapView:viewFor:) so that the developer can implement their annotation view to replace the default. (We have an example of that implementation coming in mapbox/ios-sdk-examples#50.)
Can you please guide me where in the code the default shape for this annotation was set. Is this part of mapbox-navigation-ios or it is a part of MapboxDirections?
Activity
1ec5 commentedon May 9, 2017
RouteMapViewController is the NavigationMapView’s delegate (conforming to MGLMapViewDelegate). Since a map view can’t have multiple delegates, we need to plumb some additional MGLMapViewDelegate methods through RouteMapViewControllerDelegate, NavigationViewController, and NavigationViewControllerDelegate.
In particular,
MGLMapViewDelegate.mapView(_:viewFor:)needs to be exposed asNavigationViewControllerDelegate.navigationViewController(_:mapView:viewFor:)so that the developer can implement their annotation view to replace the default. (We have an example of that implementation coming in mapbox/ios-sdk-examples#50.)av0c0der commentedon May 17, 2017
@1ec5 will it also support changing user location annotation in
navigationmode?av0c0der commentedon May 17, 2017
Can you please guide me where in the code the default shape for this annotation was set. Is this part of
mapbox-navigation-iosor it is a part ofMapboxDirections?1ec5 commentedon May 17, 2017
Yes.
The navigation SDK is currently using the default annotation image provided by the iOS map SDK (mapbox-gl-native).
1ec5 commentedon Aug 15, 2017
#498 would expose the delegate method for customizing the user location annotation view.
bsudekum commentedon Aug 16, 2017
This has been implemented.
Cleaned up VisualInstructionComponent scale code (mapbox#213)