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 }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Add delegate method for the user location annotation’s position #12203
annotationsAnnotations on iOS and macOS or markers on AndroidiOSMapbox Maps SDK for iOSnavigationFor the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
#11342 proposes adding two new values to the MGLAnnotationVerticalAlignment enumeration that fall between existing values. The existing values clearly aren’t granular enough, but I don’t think we can keep adding new values to accommodate specific applications. Instead, we should add a method to MGLMapViewDelegate that lets the developer decide where the annotation view should be positioned on screen (and thus where the camera’s center coordinate is positioned on screen). This delegate method would be modeled after NavigationViewControllerDelegate.navigationViewController(_:mapViewUserAnchorPoint:), which we introduced in mapbox/mapbox-navigation-ios#402.
The new delegate method would be called from within -userLocationAnnotationViewCenter. We could alternatively expose -userLocationAnnotationViewCenter publicly, but I think that could be problematic for developers who can’t subclass MGLMapView for whatever reason.
This issue blocks the navigation SDK from readopting the map SDK’s user location annotation functionality. Fortunately, it may be straightforward to upstream the navigation SDK’s approach to customizing the position. As part of implementing this feature, we’d probably want to deprecate the existing MGLAnnotationVerticalAlignment enumeration, which we now recognize is far too simplistic for navigation use cases.
annotationsAnnotations on iOS and macOS or markers on AndroidiOSMapbox Maps SDK for iOSnavigationFor the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
Activity
1ec5 commentedon Jun 22, 2018
The new delegate method would be called from within
-userLocationAnnotationViewCenter. We could alternatively expose-userLocationAnnotationViewCenterpublicly, but I think that could be problematic for developers who can’t subclass MGLMapView for whatever reason.1ec5 commentedon Jul 2, 2018
Unlike the instance method proposed in #6867, the delegate method proposed here would require no subclassing.
1ec5 commentedon Sep 14, 2018
This issue blocks the navigation SDK from readopting the map SDK’s user location annotation functionality. Fortunately, it may be straightforward to upstream the navigation SDK’s approach to customizing the position. As part of implementing this feature, we’d probably want to deprecate the existing
MGLAnnotationVerticalAlignmentenumeration, which we now recognize is far too simplistic for navigation use cases.