NavigationMapViewDelegate

The NavigationMapViewDelegate provides methods for configuring the NavigationMapView, as well as responding to events triggered by the NavigationMapView.

  • Asks the receiver to return an MGLStyleLayer for routes, given an identifier and source. This method is invoked when the map view loads and any time routes are added.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation

  • Asks the receiver to return an MGLStyleLayer for waypoints, given an identifier and source. This method is invoked when the map view loads and any time waypoints are added.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation

  • Asks the receiver to return an MGLStyleLayer for waypoint symbols, given an identifier and source. This method is invoked when the map view loads and any time waypoints are added.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation

  • Asks the receiver to return an MGLStyleLayer for route casings, given an identifier and source. This method is invoked when the map view loads and anytime routes are added.

    Note

    Specify a casing to ensure good contrast between the route line and the underlying map layers.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation

  • navigationMapView(_:didSelect:) Default implementation

    Tells the receiver that the user has selected a route by interacting with the map view.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation

  • navigationMapView(_:shapeFor:) Default implementation

    Asks the receiver to return an MGLShape that describes the geometry of the route.

    Note

    The returned value represents the route in full detail. For example, individual MGLPolyline objects in an MGLShapeCollectionFeature object can represent traffic congestion segments. For improved performance, you should also implement navigationMapView(_:simplifiedShapeFor:), which defines the overall route as a single feature.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation

  • Asks the receiver to return an MGLShape that describes the geometry of the route at lower zoomlevels.

    Note

    The returned value represents the simplfied route. It is designed to be used with `navigationMapView(_:shapeFor:), and if used without its parent method, can cause unexpected behavior.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation

  • Asks the receiver to return an MGLShape that describes the geometry of the waypoint.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation

  • navigationMapViewUserAnchorPoint(_:) Default implementation

    Asks the receiver to return a CGPoint to serve as the anchor for the user icon.

    Important

    The return value should be returned in the normal UIKit coordinate-space, NOT CoreAnimation’s unit coordinate-space.

    Note

    This delegate method includes a default implementation that prints a warning to the console when this method is called. See UnimplementedLogging for details.

    Default Implementation