NavigationMapViewDelegate
public protocol NavigationMapViewDelegate : AnyObject, UnimplementedLogging
The NavigationMapViewDelegate provides methods for configuring the NavigationMapView, as well as responding to events triggered by the NavigationMapView.
-
navigationMapView(_:waypointCircleLayerWithIdentifier:sourceIdentifier:)Default implementationAsks the receiver to return a
CircleLayerfor waypoints, given an identifier and source. This method is invoked any time waypoints are added or shown.Default Implementation
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func navigationMapView(_ navigationMapView: NavigationMapView, waypointCircleLayerWithIdentifier identifier: String, sourceIdentifier: String) -> CircleLayer?Parameters
navigationMapViewThe
NavigationMapView.identifierThe style identifier.
sourceThe Layer source containing the waypoint data that this method would style.
Return Value
A
CircleLayerthat the map applies to all waypoints. -
navigationMapView(_:waypointSymbolLayerWithIdentifier:sourceIdentifier:)Default implementationAsks the receiver to return a
SymbolLayerfor waypoint symbols, given an identifier and source. This method is invoked any time waypoints are added or shown.Default Implementation
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func navigationMapView(_ navigationMapView: NavigationMapView, waypointSymbolLayerWithIdentifier identifier: String, sourceIdentifier: String) -> SymbolLayer?Parameters
navigationMapViewThe
NavigationMapView.identifierThe style identifier.
sourceThe Layer source containing the waypoint data that this method would style.
Return Value
A
SymbolLayerthat the map applies to all waypoint symbols. -
navigationMapView(_:didSelect:)Default implementationTells the receiver that the user has selected a route by interacting with the map view.
Default Implementation
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func navigationMapView(_ navigationMapView: NavigationMapView, didSelect route: Route)Parameters
navigationMapViewThe
NavigationMapView.routeThe route that was selected.
-
Tells the receiver that a waypoint was selected.
Declaration
Swift
func navigationMapView(_ navigationMapView: NavigationMapView, didSelect waypoint: Waypoint)Parameters
navigationMapViewThe
NavigationMapView.waypointThe waypoint that was selected.
-
navigationMapView(_:shapeFor:legIndex:)Default implementationAsks the receiver to return a
FeatureCollectionthat describes the geometry of the waypoint.Default Implementation
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func navigationMapView(_ navigationMapView: NavigationMapView, shapeFor waypoints: [Waypoint], legIndex: Int) -> FeatureCollection?Parameters
navigationMapViewThe
NavigationMapView.waypointsThe waypoints to be displayed on the map.
Return Value
Optionally, a
FeatureCollectionthat defines the shape of the waypoint, ornilto use default behavior. -
navigationMapViewUserAnchorPoint(_:)Default implementationAsks the receiver to return a
CGPointto 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.Default Implementation
UnimplementedLoggingprints a warning to standard output the first time this method is called.Declaration
Swift
func navigationMapViewUserAnchorPoint(_ navigationMapView: NavigationMapView) -> CGPointParameters
navigationMapViewThe
NavigationMapView.Return Value
A
CGPoint(in regular coordinate-space) that represents the point on-screen where the user location icon should be drawn.
Install in Dash
NavigationMapViewDelegate Protocol Reference