MapViewDelegate
class MapViewDelegate : NSObject, MKMapViewDelegate, UIAlertViewDelegate
Handles all delegate functions of the GPX Mapview
-
The Waypoint is being edited (if there is any)
Declaration
Swift
var waypointBeingEdited: GPXWaypoint
-
Displays a pin with whose annotation (bubble) will include delete and edit buttons.
Declaration
Swift
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView?
-
Displays the line for each segment
Declaration
Swift
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer
-
Handles the actions of delete and edit button
Declaration
Swift
func mapView(_ mapView: MKMapView, annotationView view: MKAnnotationView, calloutAccessoryControlTapped control: UIControl)
-
Handles the change of the coordinates when a pin is dropped.
Declaration
Swift
func mapView(_ mapView: MKMapView, annotationView view: MKAnnotationView, didChange newState: MKAnnotationView.DragState, fromOldState oldState: MKAnnotationView.DragState)
-
Adds the pin to the map with an animation (comes from the top of the screen)
Declaration
Swift
func mapView(_ mapView: MKMapView, didAdd views: [MKAnnotationView])
-
Adds a small arrow image to the annotationView. This annotationView should be the MKUserLocation
Declaration
Swift
func addHeadingView(toAnnotationView annotationView: MKAnnotationView)
-
Updates map heading after user interactions end.
Declaration
Swift
func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool)