-
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
Clean up NavigationMapViewDelegate method names #1378
Conversation
fc9da6c
to
7285f03
Compare
@@ -78,58 +78,58 @@ public protocol NavigationViewControllerDelegate { | |||
|
|||
If this method is unimplemented, the navigation map view draws the route line using an `MGLLineStyleLayer`. | |||
*/ | |||
@objc optional func navigationMapView(_ mapView: NavigationMapView, routeStyleLayerWithIdentifier identifier: String, source: MGLSource) -> MGLStyleLayer? | |||
@objc optional func navigationViewController(_ navigationViewController: NavigationViewController, routeStyleLayerWithIdentifier identifier: String, source: MGLSource) -> MGLStyleLayer? | |||
|
|||
/** | |||
Returns an `MGLStyleLayer` that determines the appearance of the route line’s casing. | |||
|
|||
If this method is unimplemented, the navigation map view draws the route line’s casing using an `MGLLineStyleLayer` whose width is greater than that of the style layer returned by `navigationMapView(_:routeStyleLayerWithIdentifier:source:)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is outdated.
@@ -468,36 +468,36 @@ open class NavigationViewController: UIViewController { | |||
|
|||
//MARK: - RouteMapViewControllerDelegate | |||
extension NavigationViewController: RouteMapViewControllerDelegate { | |||
public func navigationMapView(_ mapView: NavigationMapView, routeCasingStyleLayerWithIdentifier identifier: String, source: MGLSource) -> MGLStyleLayer? { | |||
return delegate?.navigationMapView?(mapView, routeCasingStyleLayerWithIdentifier: identifier, source: source) | |||
public func navigationViewController(_ navigationViewController: NavigationViewController, routeCasingStyleLayerWithIdentifier identifier: String, source: MGLSource) -> MGLStyleLayer? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are implementations of RouteMapViewControllerDelegate methods, which haven’t been renamed.
- `NavigationMapViewDelegate.navigationMapView(_:viewForAnnotation:)` renamed to `NavigationMapViewDelegate.navigationMapView(_:viewFor:)`. | ||
- `NavigationViewControllerDelegate.navigationViewControllerDidCancelNavigation(_:)` to `NavigationViewControllerDelegate.navigationViewControllerDidDismiss(_:byCanceling:)` | ||
* Renamed several `NavigationMapViewDelegate` methods ([#1364](https://github.com/mapbox/mapbox-navigation-ios/pull/1364), [#1338](https://github.com/mapbox/mapbox-navigation-ios/pull/1338), [#1318](https://github.com/mapbox/mapbox-navigation-ios/pull/1318), [#1378](https://github.com/mapbox/mapbox-navigation-ios/pull/1378)): | ||
* `NavigationViewControllerDelegate.navigationViewControllerDidCancelNavigation(_:)` to `NavigationViewControllerDelegate.navigationViewControllerDidDismiss(_:byCanceling:)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changelog should list more renamed methods of NavigationViewControllerDelegate.
Reverted some NavigationMapViewDelegate method names to conform to Objective-C naming conventions and be more consistent.
9375fed
to
dbb4c93
Compare
Reverted some NavigationMapViewDelegate method names to conform to Objective-C naming conventions and be more consistent.
Relative to master:
navigationMapView(_:shapeDescribing:)
navigationMapView(_:shapeFor:)
-navigationMapView:shapeDescribing:
-navigationMapView:shapeForRoute:
navigationMapView(_:simplifiedShapeDescribing:)
navigationMapView(_:simplifiedShapeFor:)
-navigationMapView:simplifiedShapeDescribing:
-navigationMapView:simplifiedShapeForRoute:
navigationMapView(_:shapeFor:legIndex:)
navigationMapView(_:shapeFor:legIndex:)
-navigationMapView:shapeFor:legIndex:
-navigationMapView:shapeForWaypoints:legIndex:
navigationMapView(_:imageFor:)
navigationMapView(_:imageFor:)
-navigationMapView:imageFor:
-navigationMapView:imageForAnnotation:
navigationMapView(_:viewFor:)
navigationMapView(_:viewFor:)
-navigationMapView:viewFor:
-navigationMapView:viewForAnnotation:
Relative to v0.17.0-beta.1, the only changes are:
navigationMapView(_:shapeDescribing:)
navigationMapView(_:shapeFor:)
-navigationMapView:shapeDescribingRoute:
-navigationMapView:shapeForRoute:
navigationMapView(_:simplifiedShapeDescribing:)
navigationMapView(_:simplifiedShapeFor:)
-navigationMapView:simplifiedShapeDescribingRoute:
-navigationMapView:simplifiedShapeForRoute:
navigationMapView(_:shapeFor:legIndex:)
navigationMapView(_:shapeFor:legIndex:)
-navigationMapView:shapeDescribingWaypoints:legIndex:
-navigationMapView:shapeForWaypoints:legIndex:
Fixes #1375.
/cc @vincethecoder @bsudekum