SKMapViewDelegate Protocol Reference

Conforms to NSObject
Declared in SKMapViewDelegate.h

Overview

The delegate of a SKMapView object must adopt the SKMapViewDelegate protocol. The SKMapViewDelegate protocol is used to receive map-related update messages.

– mapView:didStartRegionChangeFromRegion:

Called when the region of the map will begin changing. During a panning/zooming gesture, this method is called once, at the beginning of the interaction.

- (void)mapView:(SKMapView *)mapView didStartRegionChangeFromRegion:(SKCoordinateRegion)region

Parameters

mapView

The map view.

region

The current visible map region.

Discussion

Called when the region of the map will begin changing. During a panning/zooming gesture, this method is called once, at the beginning of the interaction.

Declared In

SKMapViewDelegate.h

– mapView:didChangeToRegion:

Called when the visible region of the map changes. During panning/zooming, this method may be called many times to report updates to the map visible region. The implementation of this method should be as lightweight as possible to avoid performance problems.

- (void)mapView:(SKMapView *)mapView didChangeToRegion:(SKCoordinateRegion)region

Parameters

mapView

The map view.

region

The new visible map region.

Discussion

Called when the visible region of the map changes. During panning/zooming, this method may be called many times to report updates to the map visible region. The implementation of this method should be as lightweight as possible to avoid performance problems.

Declared In

SKMapViewDelegate.h

– mapView:didEndRegionChangeToRegion:

Called when the region of the map will end changing. During a panning/zooming gesture, this method is called once, at the end of the interaction.

- (void)mapView:(SKMapView *)mapView didEndRegionChangeToRegion:(SKCoordinateRegion)region

Parameters

mapView

The map view.

region

The final visible map region.

Discussion

Called when the region of the map will end changing. During a panning/zooming gesture, this method is called once, at the end of the interaction.

Declared In

SKMapViewDelegate.h

– mapView:didTapAtCoordinate:

Called when the map is tapped.

- (void)mapView:(SKMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate

Parameters

mapView

The map view.

coordinate

The coordinate where the tap occured.

Discussion

Called when the map is tapped.

Declared In

SKMapViewDelegate.h

– mapView:didLongTapAtCoordinate:

Called when the map is long tapped.

- (void)mapView:(SKMapView *)mapView didLongTapAtCoordinate:(CLLocationCoordinate2D)coordinate

Parameters

mapView

The map view.

coordinate

The coordinate where the long tap occured.

Discussion

Called when the map is long tapped.

Declared In

SKMapViewDelegate.h

– mapView:didDoubleTapAtCoordinate:

Called when the map is double tapped.

- (void)mapView:(SKMapView *)mapView didDoubleTapAtCoordinate:(CLLocationCoordinate2D)coordinate

Parameters

mapView

The map view.

coordinate

The coordinate where the double tap occured. On double tap, the map also zooms closer to that location.

Discussion

Called when the map is double tapped.

Declared In

SKMapViewDelegate.h

– mapView:didDoubleTouchAtPoint:

Called when the map is double touched.

- (void)mapView:(SKMapView *)mapView didDoubleTouchAtPoint:(CGPoint)point

Parameters

mapView

The map view.

point

The centroid of the points where the double touch occured. On double touch, the map also zooms farther to that location.

Discussion

Called when the map is double touched.

Declared In

SKMapViewDelegate.h

– mapView:didPanFromPoint:toPoint:

Called when the map is panned.

- (void)mapView:(SKMapView *)mapView didPanFromPoint:(CGPoint)fromPoint toPoint:(CGPoint)toPoint

Parameters

mapView

The map view.

fromPoint

The point where the panning started.

toPoint

The point where the panning finished.

Discussion

Called when the map is panned.

Declared In

SKMapViewDelegate.h

– mapView:didPinchWithScale:

Called when the user pinched the SKMapView to zoom it.

- (void)mapView:(SKMapView *)mapView didPinchWithScale:(float)scale

Parameters

mapView

The map view.

scale

The scale of the pinch. scale is > 1 for zoom in and < 1 for zoom out.

Discussion

Called when the user pinched the SKMapView to zoom it.

Declared In

SKMapViewDelegate.h

– mapView:didRotateWithAngle:

Called when the map is rotated.

- (void)mapView:(SKMapView *)mapView didRotateWithAngle:(float)angle

Parameters

mapView

The map view.

angle

The angle of the rotation, in degrees.

Discussion

Called when the map is rotated.

Declared In

SKMapViewDelegate.h

– mapViewWillRequireOnlineConnection:

Called when the map is panned to an area where no tiles are available and the framework is in connectivity mode offline.

- (void)mapViewWillRequireOnlineConnection:(SKMapView *)mapView

Parameters

mapView

The map view.

Discussion

Called when the map is panned to an area where no tiles are available and the framework is in connectivity mode offline.

Declared In

SKMapViewDelegate.h

– mapView:didSelectMapPOI:

Called when a map POI is tapped.

- (void)mapView:(SKMapView *)mapView didSelectMapPOI:(SKMapPOI *)mapPOI

Parameters

mapView

The map view.

mapPOI

The POI that was tapped.

Discussion

Called when a map POI is tapped.

Declared In

SKMapViewDelegate.h

– mapView:didSelectAnnotation:

Called when an annotation was tapped on the map.

- (void)mapView:(SKMapView *)mapView didSelectAnnotation:(SKAnnotation *)annotation

Parameters

mapView

The map view.

annotation

The annotation that was tapped.

Discussion

Called when an annotation was tapped on the map.

Declared In

SKMapViewDelegate.h

– mapView:didSelectCustomPOI:

Called when a custom POI was tapped on the map.

- (void)mapView:(SKMapView *)mapView didSelectCustomPOI:(SKMapCustomPOI *)customPOI

Parameters

mapView

The map view.

customPOI

The custom POI that was tapped.

Discussion

Called when a custom POI was tapped on the map.

Declared In

SKMapViewDelegate.h

– mapView:didSelectPOICluster:

An annotations cluster was tapped. Use this method to provide extra info for selected annotations cluster.

- (void)mapView:(SKMapView *)mapView didSelectPOICluster:(SKPOICluster *)poiCluster

Parameters

mapView

The map view.

poiCluster

Stores information about the selected annotation cluster. For durther details see the SKPOICluster class.

Discussion

An annotations cluster was tapped. Use this method to provide extra info for selected annotations cluster.

Declared In

SKMapViewDelegate.h

– mapViewDidSelectCompass:

Called when the compass of the map view was tapped.

- (void)mapViewDidSelectCompass:(SKMapView *)mapView

Parameters

mapView

The map view.

Discussion

Called when the compass of the map view was tapped.

Declared In

SKMapViewDelegate.h

– mapViewDidSelectCurrentPositionIcon:

Called when the curent position icon on the map view was tapped.

- (void)mapViewDidSelectCurrentPositionIcon:(SKMapView *)mapView

Parameters

mapView

The map view.

Discussion

Called when the curent position icon on the map view was tapped.

Declared In

SKMapViewDelegate.h

– mapView:calloutViewForLocation:

Called when a callout should be shown at a certain position.(After calling the showCalloutAtLocation:withOffset:animated: method this method will be called immediately)

- (nullable UIView *)mapView:(SKMapView *)mapView calloutViewForLocation:(CLLocationCoordinate2D)location

Parameters

mapView

The map view.

location

The location of the callout view.

Discussion

Called when a callout should be shown at a certain position.(After calling the showCalloutAtLocation:withOffset:animated: method this method will be called immediately)

Declared In

SKMapViewDelegate.h

– mapView:calloutViewForAnnotation:

Called when a callout should be shown for a certain annotation.(After calling the showCalloutForAnnotation:withOffset:animated: method this method will be called immediately)

- (nullable UIView *)mapView:(SKMapView *)mapView calloutViewForAnnotation:(SKAnnotation *)annotation

Parameters

mapView

The map view.

annotation

The annotation of the callout view.

Discussion

Called when a callout should be shown for a certain annotation.(After calling the showCalloutForAnnotation:withOffset:animated: method this method will be called immediately)

Declared In

SKMapViewDelegate.h

– mapViewDidTapAttribution:

Called when one of the attributions is tapped.

- (void)mapViewDidTapAttribution:(SKMapView *)mapView

Parameters

mapView

The map view.

Discussion

Called when one of the attributions is tapped.

Declared In

SKMapViewDelegate.h

– mapView:didSelectOverlayWithId:atLocation:

Called when one of the overlays is tapped.

- (void)mapView:(SKMapView *)mapView didSelectOverlayWithId:(int)overlayId atLocation:(CLLocationCoordinate2D)location

Parameters

mapView

The map view.

overlayId

The identifier of the overlay.

location

The location where the tap occured.

Discussion

Called when one of the overlays is tapped.

Declared In

SKMapViewDelegate.h

– mapViewDidFinishRenderingImageInBoundingBox:

Called when the asynchronous rendering of a map image in a file did finish.

- (void)mapViewDidFinishRenderingImageInBoundingBox:(SKMapView *)mapView

Parameters

mapView

The map view.

Discussion

Called when the asynchronous rendering of a map image in a file did finish.

Declared In

SKMapViewDelegate.h

– mapView:realReachCompletedWithBoundingBox:

Called after a real reach calculation has been completed.

- (void)mapView:(SKMapView *)mapView realReachCompletedWithBoundingBox:(nullable SKBoundingBox *)boundingBox

Parameters

mapView

The map view.

boundingBox

The bounding box of the real reach polygon. This will be nil if real reach calculation has failed.

Discussion

Called after a real reach calculation has been completed.

Declared In

SKMapViewDelegate.h