Interface MKMapViewDelegate


  • public interface MKMapViewDelegate
    • Method Detail

      • mapViewAnnotationViewCalloutAccessoryControlTapped

        default void mapViewAnnotationViewCalloutAccessoryControlTapped​(@NotNull
                                                                        @NotNull MKMapView mapView,
                                                                        @NotNull
                                                                        @NotNull MKAnnotationView view,
                                                                        @NotNull
                                                                        @NotNull UIControl control)
        mapView:annotationView:calloutAccessoryControlTapped: is called when the user taps on left & right callout accessory UIControls.
      • mapViewAnnotationViewDidChangeDragStateFromOldState

        default void mapViewAnnotationViewDidChangeDragStateFromOldState​(@NotNull
                                                                         @NotNull MKMapView mapView,
                                                                         @NotNull
                                                                         @NotNull MKAnnotationView view,
                                                                         long newState,
                                                                         long oldState)
        API-Since: 4.0
      • mapViewDidAddAnnotationViews

        default void mapViewDidAddAnnotationViews​(@NotNull
                                                  @NotNull MKMapView mapView,
                                                  @NotNull
                                                  @NotNull NSArray<? extends MKAnnotationView> views)
        mapView:didAddAnnotationViews: is called after the annotation views have been added and positioned in the map. The delegate can implement this method to animate the adding of the annotations views. Use the current positions of the annotation views as the destinations of the animation.
      • mapViewDidAddOverlayRenderers

        default void mapViewDidAddOverlayRenderers​(@NotNull
                                                   @NotNull MKMapView mapView,
                                                   @NotNull
                                                   @NotNull NSArray<? extends MKOverlayRenderer> renderers)
        API-Since: 7.0
      • mapViewDidAddOverlayViews

        @Deprecated
        default void mapViewDidAddOverlayViews​(@NotNull
                                               @NotNull MKMapView mapView,
                                               @NotNull
                                               @NotNull NSArray<?> overlayViews)
        Deprecated.
        Called after the provided overlay views have been added and positioned in the map. Prefer -mapView:didAddOverlayRenderers: API-Since: 4.0 Deprecated-Since: 13.0
      • mapViewDidChangeUserTrackingModeAnimated

        default void mapViewDidChangeUserTrackingModeAnimated​(@NotNull
                                                              @NotNull MKMapView mapView,
                                                              long mode,
                                                              boolean animated)
        API-Since: 5.0
      • mapViewDidDeselectAnnotationView

        default void mapViewDidDeselectAnnotationView​(@NotNull
                                                      @NotNull MKMapView mapView,
                                                      @NotNull
                                                      @NotNull MKAnnotationView view)
        API-Since: 4.0
      • mapViewDidFailToLocateUserWithError

        default void mapViewDidFailToLocateUserWithError​(@NotNull
                                                         @NotNull MKMapView mapView,
                                                         @NotNull
                                                         @NotNull NSError error)
        API-Since: 4.0
      • mapViewDidSelectAnnotationView

        default void mapViewDidSelectAnnotationView​(@NotNull
                                                    @NotNull MKMapView mapView,
                                                    @NotNull
                                                    @NotNull MKAnnotationView view)
        API-Since: 4.0
      • mapViewDidUpdateUserLocation

        default void mapViewDidUpdateUserLocation​(@NotNull
                                                  @NotNull MKMapView mapView,
                                                  @NotNull
                                                  @NotNull MKUserLocation userLocation)
        API-Since: 4.0
      • mapViewRegionDidChangeAnimated

        default void mapViewRegionDidChangeAnimated​(@NotNull
                                                    @NotNull MKMapView mapView,
                                                    boolean animated)
      • mapViewRegionWillChangeAnimated

        default void mapViewRegionWillChangeAnimated​(@NotNull
                                                     @NotNull MKMapView mapView,
                                                     boolean animated)
      • mapViewRendererForOverlay

        @NotNull
        default @NotNull MKOverlayRenderer mapViewRendererForOverlay​(@NotNull
                                                                     @NotNull MKMapView mapView,
                                                                     @NotNull
                                                                     @NotNull MKOverlay overlay)
        API-Since: 7.0
      • mapViewViewForAnnotation

        @Nullable
        default @Nullable MKAnnotationView mapViewViewForAnnotation​(@NotNull
                                                                    @NotNull MKMapView mapView,
                                                                    @NotNull
                                                                    @NotNull MKAnnotation annotation)
        mapView:viewForAnnotation: provides the view for each annotation. This method may be called for all or some of the added annotations. For MapKit provided annotations (eg. MKUserLocation) return nil to use the MapKit provided annotation view.
      • mapViewViewForOverlay

        @NotNull
        @Deprecated
        default @NotNull MKOverlayView mapViewViewForOverlay​(@NotNull
                                                             @NotNull MKMapView mapView,
                                                             @NotNull
                                                             @NotNull MKOverlay overlay)
        Deprecated.
        Prefer -mapView:rendererForOverlay: API-Since: 4.0 Deprecated-Since: 13.0
      • mapViewDidFailLoadingMapWithError

        default void mapViewDidFailLoadingMapWithError​(@NotNull
                                                       @NotNull MKMapView mapView,
                                                       @NotNull
                                                       @NotNull NSError error)
      • mapViewDidFinishLoadingMap

        default void mapViewDidFinishLoadingMap​(@NotNull
                                                @NotNull MKMapView mapView)
      • mapViewDidFinishRenderingMapFullyRendered

        default void mapViewDidFinishRenderingMapFullyRendered​(@NotNull
                                                               @NotNull MKMapView mapView,
                                                               boolean fullyRendered)
        API-Since: 7.0
      • mapViewDidStopLocatingUser

        default void mapViewDidStopLocatingUser​(@NotNull
                                                @NotNull MKMapView mapView)
        API-Since: 4.0
      • mapViewWillStartLoadingMap

        default void mapViewWillStartLoadingMap​(@NotNull
                                                @NotNull MKMapView mapView)
      • mapViewWillStartLocatingUser

        default void mapViewWillStartLocatingUser​(@NotNull
                                                  @NotNull MKMapView mapView)
        API-Since: 4.0
      • mapViewWillStartRenderingMap

        default void mapViewWillStartRenderingMap​(@NotNull
                                                  @NotNull MKMapView mapView)
        API-Since: 7.0
      • mapViewClusterAnnotationForMemberAnnotations

        @NotNull
        default @NotNull MKClusterAnnotation mapViewClusterAnnotationForMemberAnnotations​(@NotNull
                                                                                          @NotNull MKMapView mapView,
                                                                                          @NotNull
                                                                                          @NotNull NSArray<?> memberAnnotations)
        Return nil for default MKClusterAnnotation, it is illegal to return a cluster annotation not containing the identical array of member annotations given. API-Since: 11.0
      • mapViewDidChangeVisibleRegion

        default void mapViewDidChangeVisibleRegion​(@NotNull
                                                   @NotNull MKMapView mapView)
        API-Since: 11.0
      • mapViewDidDeselectAnnotation

        default void mapViewDidDeselectAnnotation​(@NotNull
                                                  @NotNull MKMapView mapView,
                                                  @NotNull
                                                  @NotNull MKAnnotation annotation)
        API-Since: 16.0
      • mapViewDidSelectAnnotation

        default void mapViewDidSelectAnnotation​(@NotNull
                                                @NotNull MKMapView mapView,
                                                @NotNull
                                                @NotNull MKAnnotation annotation)
        API-Since: 16.0