HereSDKMapViewDelegate
@protocol HereSDKMapViewDelegate <NSObject>
Protocol for receiving map view updates.
-
Received when user hash is expired
Declaration
Objective-C
- (void)mapViewAuthenticationDidFail:(nonnull HereSDKMapView *)mapView withError:(nonnull NSError *)error;Swift
optional func mapViewAuthenticationDidFail(_ mapView: HereSDKMapView, withError error: Error)Parameters
mapViewmapview instance
errorthe error passed to delegate
-
Update that mapview finished loading (its definition)
Declaration
Objective-C
- (void)mapViewDidFinishLoadingMap:(nonnull HereSDKMapView *)mapView;Swift
optional func mapViewDidFinishLoadingMap(_ mapView: HereSDKMapView)Parameters
mapViewmapview that finished loading
-
Return annotation style for specific annotation
Declaration
Objective-C
- (nullable HereSDKAnnotationStyle *)mapView:(nonnull HereSDKMapView *)mapView styleForAnnotation: (nonnull id<HereSDKAnnotation>)annotation;Parameters
mapViewmapview that has annotation
annotationannotation to style
Return Value
annotation style
-
Update that user location was updated on mapview
Declaration
Objective-C
- (void)mapView:(nonnull HereSDKMapView *)mapView didUpdateUserLocationAnnotation: (nonnull HereSDKUserLocationAnnotation *)userLocationAnnotation;Swift
optional func mapView(_ mapView: HereSDKMapView, didUpdate userLocationAnnotation: HereSDKUserLocationAnnotation)Parameters
mapViewmapview that present user location
userLocationAnnotationuserLocationAnnotation that has been updated
-
Update that mapview recognized a long press gesture
Declaration
Objective-C
- (void)mapView:(nonnull HereSDKMapView *)mapView didRecognizeLongPressGestureForLocation:(nonnull CLLocation *)location;Swift
optional func mapView(_ mapView: HereSDKMapView, didRecognizeLongPressGestureFor location: CLLocation)Parameters
mapViewmapview that recognized the long press gesture
locationCLLocation of the gesture
-
Update that mapview recognized a tap gesture
Declaration
Objective-C
- (void)mapView:(nonnull HereSDKMapView *)mapView didTapLocation:(nonnull CLLocation *)location;Swift
optional func mapView(_ mapView: HereSDKMapView, didTap location: CLLocation)Parameters
mapViewmapview that recognized the tap gesture
locationCLLocation of the gesture
-
Tells the receiver an annotation was tapped
Declaration
Objective-C
- (void)mapView:(nonnull HereSDKMapView *)mapView didTapAnnotation:(nonnull id<HereSDKAnnotation>)annotation;Parameters
mapViewmapview that has annotation
annotationannotation that was tapped
-
Tells the receiver an annotation was long tapped
Declaration
Objective-C
- (void)mapView:(nonnull HereSDKMapView *)mapView didLongTapAnnotation:(nonnull id<HereSDKAnnotation>)annotation;Parameters
mapViewmapview that has annotation
annotationannotation that was long tapped
-
Returns a Boolean value indicating whether the annotation is able to display extra information in a callout bubble.
This method is called after an annotation is selected, before any callout is displayed for the annotation.
If the return value is
YES, a callout view is shown when the user taps on an annotation, selecting it. The default callout displays the annotation’stitleandsubtitle. You can customize the callout’s contents by implementing the -mapView:calloutViewForAnnotation:method.If the return value is
NO, or if this method is absent from the delegate, or if the annotation lacks a title or subtitle or themapView:calloutViewForAnnotation:is absent from the delegate or returnsnil, the annotation will not show a callout even when selected.Declaration
Objective-C
- (BOOL)mapView:(nonnull HereSDKMapView *)mapView annotationCanShowCallout:(nonnull id<HereSDKAnnotation>)annotation; -
Returns a callout view to display for the given annotation.
If this method is present in the delegate, it must return a new instance of a view dedicated to display the callout. The returned view will be configured by the map view.
If this method is absent from the delegate, or if it returns
nil, a standard, two-line, bubble-like callout view is displayed by default.Declaration
Objective-C
- (nullable UIView *)mapView:(nonnull HereSDKMapView *)mapView calloutViewForAnnotation:(nonnull id<HereSDKAnnotation>)annotation; -
Tells the receiver an annotation was selected and presented its view on the map
Declaration
Objective-C
- (void)mapView:(nonnull HereSDKMapView *)mapView didSelectAnnotation:(nonnull id<HereSDKAnnotation>)annotation;Parameters
mapViewmapview that has annotation
annotationannotation that was selected
-
Tells the receiver an annotation was deselected and its view on the map was hidden
Declaration
Objective-C
- (void)mapView:(nonnull HereSDKMapView *)mapView didDeselectAnnotation:(nonnull id<HereSDKAnnotation>)annotation;Parameters
mapViewmapview that has annotation
annotationannotation that was deselected
HereSDKMapViewDelegate Protocol Reference