-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose more MGLMapViewDelegate methods #685
Comments
NavigationMapView currently seems to implement only |
@1ec5 It would be great if we could expose all of MGLMapViewDelegate but the RouteMapViewController needs |
We could imitate |
see also #1526 |
Edited the original post with some more MGLMapViewDelegates that developers have told us they’d like to see exposed through NavigationMapViewDelegate and/or NavigationViewControllerDelegate. |
Is there a reason why we don't offer message passing of the entire |
Passing the entire public interface of MGLMapViewDelegate is the most straightforward solution. The downsides would be that NavigationViewControllerDelegate becomes even more bloated and that we still rely on manually plumbing delegate methods through both RouteMapViewController and NavigationViewController as they’re added to the map SDK. (We’ll need to keep a close eye on the map SDK for any such additions.) We could expose RouteMapViewController publicly as the go-to class for customizing the map view that’s embedded in NavigationViewController, removing one level of indirection. But there will still be the same issue of NavigationViewController hogging access to the RouteMapViewController’s delegate methods. |
We only delegate
mapView(_:viewFor:)
andmapView(_:imageFor:)
to theNavigationViewControllerDelegate
currently. Let's add a few more requested (#666) delegate methods.mapView(_:regionWillChangeAnimated:)
mapView(_:regionDidChangeAnimated:)
mapView(_:didFinishLoading:)
(both methods)mapView(_:viewForAnnotation:)
mapView(_:didAddAnnotationViews:)
mapView(_:annotationCanShowCallout:)
mapView(_:tapOnCalloutForAnnotation:)
@bsudekum @1ec5
The text was updated successfully, but these errors were encountered: