高德地图SDK(导航)  V11.1.000
<MAMapViewDelegate> Protocol Reference

#import <MAMapView.h>

Inheritance diagram for <MAMapViewDelegate>:

Instance Methods

(void) - mapViewRegionChanged:
 地图区域改变过程中会调用此接口 since 4.6.0 This interface will be called during the map region change process. since 4.6.0 More...
 
(void) - mapView:regionWillChangeAnimated:
 地图区域即将改变时会调用此接口 This interface will be called when the map region is about to change More...
 
(void) - mapView:regionDidChangeAnimated:
 地图区域改变完成后会调用此接口 This interface will be called after the map region change is completed More...
 
(void) - mapView:regionWillChangeAnimated:wasUserAction:
 地图区域即将改变时会调用此接口,如实现此接口则不会触发回掉mapView:regionWillChangeAnimated: This interface will be called when the map region is about to change, and if this interface is implemented, the callback mapView:regionWillChangeAnimated: will not be triggered More...
 
(void) - mapView:regionDidChangeAnimated:wasUserAction:
 地图区域改变完成后会调用此接口,如实现此接口则不会触发回掉mapView:regionDidChangeAnimated: This interface will be called after the map region change is completed,and if this interface is implemented, the callback mapView:regionDidChangeAnimated: will not be triggered More...
 
(void) - mapView:mapWillMoveByUser:
 地图将要发生移动时调用此接口 This interface will be called when the map is about to move More...
 
(void) - mapView:mapDidMoveByUser:
 地图移动结束后调用此接口 This interface will be called after the map movement ends More...
 
(void) - mapView:mapWillZoomByUser:
 地图将要发生缩放时调用此接口 This interface is called when the map is about to zoom More...
 
(void) - mapView:mapDidZoomByUser:
 地图缩放结束后调用此接口 This interface is called after the map zoom ends More...
 
(void) - mapViewWillStartLoadingMap:
 地图开始加载 The map starts loading More...
 
(void) - mapViewDidFinishLoadingMap:
 地图加载成功 The map is loaded successfully More...
 
(void) - mapViewDidFailLoadingMap:withError:
 地图加载失败 The map fails to load More...
 
(void) - mapView:didFailLoadTerrainWithError:
 地形图加载失败 Terrain map failed to load More...
 
(MAAnnotationView *) - mapView:viewForAnnotation:
 根据anntation生成对应的View。 Generate corresponding View based on annotation. More...
 
(void) - mapView:didAddAnnotationViews:
 当mapView新添加annotation views时,调用此接口 This interface is called when new annotation views are added to the mapView More...
 
(void) - mapView:didSelectAnnotationView:
 当选中一个annotation view时,调用此接口. 注意如果已经是选中状态,再次点击不会触发此回调。取消选中需调用-(void)deselectAnnotation:animated: This interface is called when an annotation view is selected. Note that if it is already in the selected state, clicking again will not trigger this callback. To deselect, call -(void)deselectAnnotation:animated: More...
 
(void) - mapView:didDeselectAnnotationView:
 当取消选中一个annotation view时,调用此接口 This interface is called when an annotation view is deselected More...
 
(void) - mapViewWillStartLocatingUser:
 在地图View将要启动定位时,会调用此函数 This function is called when the map view is about to start positioning More...
 
(void) - mapViewDidStopLocatingUser:
 在地图View停止定位后,会调用此函数 This function will be called after the MapView stops locating More...
 
(void) - mapView:didUpdateUserLocation:updatingLocation:
 位置或者设备方向更新后,会调用此函数 This function will be called after the location or device orientation is updated More...
 
(void) - mapViewRequireLocationAuth:
 当plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription,并且[CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined,会调用代理的此方法。 此方法实现调用后台权限API即可( 该回调必须实现 [locationManager requestAlwaysAuthorization] ); since 6.8.0 When the plist is configured with NSLocationAlwaysUsageDescription or NSLocationAlwaysAndWhenInUseUsageDescription, and [CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined, this method of the delegate will be called. This method just needs to call the background permission API (this callback must implement [locationManager requestAlwaysAuthorization]); since 6.8.0 More...
 
(void) - mapView:didFailToLocateUserWithError:
 定位失败后,会调用此函数 This function will be called after positioning failure More...
 
(void) - mapView:annotationView:didChangeDragState:fromOldState:
 拖动annotation view时view的状态变化 State changes of the annotation view during dragging More...
 
(MAOverlayRenderer *) - mapView:rendererForOverlay:
 根据overlay生成对应的Renderer Generate the corresponding Renderer based on the overlay More...
 
(void) - mapView:didAddOverlayRenderers:
 当mapView新添加overlay renderers时,调用此接口 Call this interface when mapView adds new overlay renderers More...
 
(void) - mapView:annotationView:calloutAccessoryControlTapped:
 标注view的accessory view(必须继承自UIControl)被点击时,触发该回调 When the accessory view of the annotation view (must inherit from UIControl) is clicked, this callback is triggered More...
 
(void) - mapView:didAnnotationViewCalloutTapped:
 标注view的calloutview整体点击时,触发该回调。只有使用默认calloutview时才生效。 Triggers this callback when the calloutView of the annotationView is clicked. Only takes effect when using the default calloutView More...
 
(void) - mapView:didAnnotationViewTapped:
 标注view被点击时,触发该回调。(since 5.7.0) When the annotation view is clicked, this callback is triggered (since 5.7.0) More...
 
(void) - mapView:didChangeUserTrackingMode:animated:
 当userTrackingMode改变时,调用此接口 When the userTrackingMode changes, this interface is called More...
 
(void) - mapView:didChangeOpenGLESDisabled:
 当openGLESDisabled变量改变时,调用此接口 When the openGLESDisabled variable changes, call this interface More...
 
(void) - mapView:didTouchPois:
 当touchPOIEnabled == YES时,单击地图使用该回调获取POI信息 When touchPOIEnabled == YES, click on the map to use this callback to get POI information More...
 
(void) - mapView:didSingleTappedAtCoordinate:
 单击地图回调,返回经纬度 Click on the map callback, return latitude and longitude More...
 
(void) - mapView:didLongPressedAtCoordinate:
 长按地图,返回经纬度 Long press on the map, return latitude and longitude More...
 
(void) - mapInitComplete:
 地图初始化完成(在此之后,可以进行坐标计算) Map initialization completed (after this, coordinate calculations can be performed) More...
 
(void) - mapView:didIndoorMapShowed:
 室内地图出现,返回室内地图信息 Indoor map appears, returns indoor map information More...
 
(void) - mapView:didIndoorMapFloorIndexChanged:
 室内地图楼层发生变化,返回变化的楼层 Indoor map floor changes, returns the changed floor More...
 
(void) - mapView:didIndoorMapHidden:
 室内地图消失后,返回室内地图信息 After the indoor map disappears, return to the indoor map information More...
 
(void) - offlineDataWillReload:
 离线地图数据将要被加载, 调用reloadMap会触发该回调,离线数据生效前的回调. Offline map data is about to be loaded, calling reloadMap will trigger this callback, the callback before the offline data takes effect. More...
 
(void) - offlineDataDidReload:
 离线地图数据加载完成, 调用reloadMap会触发该回调,离线数据生效后的回调. Offline map data loading completed. Calling reloadMap will trigger this callback, which is the callback after the offline data takes effect. More...
 
(void) - customMapStyleAuthFailedWithErrorCode:message:
 自定义地图样式在线数据加载鉴权失败回调 More...
 

Method Documentation

◆ customMapStyleAuthFailedWithErrorCode:message:

- (void) customMapStyleAuthFailedWithErrorCode: (int)  errorCode
message: (NSString *)  msg 
optional

自定义地图样式在线数据加载鉴权失败回调

Parameters
errorCode错误码
msg错误信息

◆ mapInitComplete:

- (void) mapInitComplete: (MAMapView *)  mapView
optional

地图初始化完成(在此之后,可以进行坐标计算) Map initialization completed (after this, coordinate calculations can be performed)

Parameters
mapView地图View Map view

◆ mapView:annotationView:calloutAccessoryControlTapped:

- (void) mapView: (MAMapView *)  mapView
annotationView: (MAAnnotationView *)  view
calloutAccessoryControlTapped: (UIControl *)  control 
optional

标注view的accessory view(必须继承自UIControl)被点击时,触发该回调 When the accessory view of the annotation view (must inherit from UIControl) is clicked, this callback is triggered

Parameters
mapView地图View Map view
viewcallout所属的标注view the annotation view to which the callout belongs
control对应的control Corresponding control

◆ mapView:annotationView:didChangeDragState:fromOldState:

- (void) mapView: (MAMapView *)  mapView
annotationView: (MAAnnotationView *)  view
didChangeDragState: (MAAnnotationViewDragState newState
fromOldState: (MAAnnotationViewDragState oldState 
optional

拖动annotation view时view的状态变化 State changes of the annotation view during dragging

Parameters
mapView地图View Map view
viewannotation view
newState新状态 New state
oldState旧状态 Old state

◆ mapView:didAddAnnotationViews:

- (void) mapView: (MAMapView *)  mapView
didAddAnnotationViews: (NSArray *)  views 
optional

当mapView新添加annotation views时,调用此接口 This interface is called when new annotation views are added to the mapView

Parameters
mapView地图View Map view
views新添加的annotation views the newly added annotation views

◆ mapView:didAddOverlayRenderers:

- (void) mapView: (MAMapView *)  mapView
didAddOverlayRenderers: (NSArray *)  overlayRenderers 
optional

当mapView新添加overlay renderers时,调用此接口 Call this interface when mapView adds new overlay renderers

Parameters
mapView地图View Map view
overlayRenderers新添加的overlay renderers Newly added overlay renderers

◆ mapView:didAnnotationViewCalloutTapped:

- (void) mapView: (MAMapView *)  mapView
didAnnotationViewCalloutTapped: (MAAnnotationView *)  view 
optional

标注view的calloutview整体点击时,触发该回调。只有使用默认calloutview时才生效。 Triggers this callback when the calloutView of the annotationView is clicked. Only takes effect when using the default calloutView

Parameters
mapView地图的view Map view
viewcalloutView所属的annotationView The annotationView to which the calloutView belongs

◆ mapView:didAnnotationViewTapped:

- (void) mapView: (MAMapView *)  mapView
didAnnotationViewTapped: (MAAnnotationView *)  view 
optional

标注view被点击时,触发该回调。(since 5.7.0) When the annotation view is clicked, this callback is triggered (since 5.7.0)

Parameters
mapView地图的view Map view
viewannotationView

◆ mapView:didChangeOpenGLESDisabled:

- (void) mapView: (MAMapView *)  mapView
didChangeOpenGLESDisabled: ((deprecated("Deprecated, since 7.9.0")))  __attribute 
optional

当openGLESDisabled变量改变时,调用此接口 When the openGLESDisabled variable changes, call this interface

Parameters
mapView地图View Map view
openGLESDisabled改变后的openGLESDisabled the changed openGLESDisabled

◆ mapView:didChangeUserTrackingMode:animated:

- (void) mapView: (MAMapView *)  mapView
didChangeUserTrackingMode: (MAUserTrackingMode mode
animated: (BOOL)  animated 
optional

当userTrackingMode改变时,调用此接口 When the userTrackingMode changes, this interface is called

Parameters
mapView地图View Map view
mode改变后的mode The changed mode
animated动画 Animation

◆ mapView:didDeselectAnnotationView:

- (void) mapView: (MAMapView *)  mapView
didDeselectAnnotationView: (MAAnnotationView *)  view 
optional

当取消选中一个annotation view时,调用此接口 This interface is called when an annotation view is deselected

Parameters
mapView地图View Map view
view取消选中的annotation view Deselect the annotation view

◆ mapView:didFailLoadTerrainWithError:

- (void) mapView: (MAMapView *)  mapView
didFailLoadTerrainWithError: (NSError *)  error 
optional

地形图加载失败 Terrain map failed to load

Parameters
mapView地图View Map view
error错误信息 Error message

◆ mapView:didFailToLocateUserWithError:

- (void) mapView: (MAMapView *)  mapView
didFailToLocateUserWithError: (NSError *)  error 
optional

定位失败后,会调用此函数 This function will be called after positioning failure

Parameters
mapView地图View Map view
error错误号,参考CLError.h中定义的错误号 Error code, refer to the error codes defined in CLError.h

◆ mapView:didIndoorMapFloorIndexChanged:

- (void) mapView: (MAMapView *)  mapView
didIndoorMapFloorIndexChanged: (MAIndoorInfo *)  indoorInfo 
optional

室内地图楼层发生变化,返回变化的楼层 Indoor map floor changes, returns the changed floor

Parameters
mapView地图View Map view
indoorInfo变化的楼层 Changing floors

◆ mapView:didIndoorMapHidden:

- (void) mapView: (MAMapView *)  mapView
didIndoorMapHidden: (MAIndoorInfo *)  indoorInfo 
optional

室内地图消失后,返回室内地图信息 After the indoor map disappears, return to the indoor map information

Parameters
mapView地图View Map view
indoorInfo室内地图信息 Indoor map information

◆ mapView:didIndoorMapShowed:

- (void) mapView: (MAMapView *)  mapView
didIndoorMapShowed: (MAIndoorInfo *)  indoorInfo 
optional

室内地图出现,返回室内地图信息 Indoor map appears, returns indoor map information

Parameters
mapView地图View Map view
indoorInfo室内地图信息 Indoor map information

◆ mapView:didLongPressedAtCoordinate:

- (void) mapView: (MAMapView *)  mapView
didLongPressedAtCoordinate: (CLLocationCoordinate2D)  coordinate 
optional

长按地图,返回经纬度 Long press on the map, return latitude and longitude

Parameters
mapView地图View Map view
coordinate经纬度 latitude and longitude

◆ mapView:didSelectAnnotationView:

- (void) mapView: (MAMapView *)  mapView
didSelectAnnotationView: (MAAnnotationView *)  view 
optional

当选中一个annotation view时,调用此接口. 注意如果已经是选中状态,再次点击不会触发此回调。取消选中需调用-(void)deselectAnnotation:animated: This interface is called when an annotation view is selected. Note that if it is already in the selected state, clicking again will not trigger this callback. To deselect, call -(void)deselectAnnotation:animated:

Parameters
mapView地图View Map view
view选中的annotation view On the selected annotation view

◆ mapView:didSingleTappedAtCoordinate:

- (void) mapView: (MAMapView *)  mapView
didSingleTappedAtCoordinate: (CLLocationCoordinate2D)  coordinate 
optional

单击地图回调,返回经纬度 Click on the map callback, return latitude and longitude

Parameters
mapView地图View Map view
coordinate经纬度 latitude and longitude

◆ mapView:didTouchPois:

- (void) mapView: (MAMapView *)  mapView
didTouchPois: (NSArray *)  pois 
optional

当touchPOIEnabled == YES时,单击地图使用该回调获取POI信息 When touchPOIEnabled == YES, click on the map to use this callback to get POI information

Parameters
mapView地图View Map view
pois获取到的poi数组(由MATouchPoi组成) the obtained poi array (composed of MATouchPoi)

◆ mapView:didUpdateUserLocation:updatingLocation:

- (void) mapView: (MAMapView *)  mapView
didUpdateUserLocation: (MAUserLocation *)  userLocation
updatingLocation: (BOOL)  updatingLocation 
optional

位置或者设备方向更新后,会调用此函数 This function will be called after the location or device orientation is updated

Parameters
mapView地图View Map view
userLocation用户定位信息(包括位置与设备方向等数据) User location information (including location and device orientation data)
updatingLocation标示是否是location数据更新, YES:location数据更新 NO:heading数据更新 Indicates whether it is a location data update, YES: location data update NO: heading data update

◆ mapView:mapDidMoveByUser:

- (void) mapView: (MAMapView *)  mapView
mapDidMoveByUser: (BOOL)  wasUserAction 
optional

地图移动结束后调用此接口 This interface will be called after the map movement ends

Parameters
mapView地图view Map view
wasUserAction标识是否是用户动作 Identifies whether it is a user action

◆ mapView:mapDidZoomByUser:

- (void) mapView: (MAMapView *)  mapView
mapDidZoomByUser: (BOOL)  wasUserAction 
optional

地图缩放结束后调用此接口 This interface is called after the map zoom ends

Parameters
mapView地图view Map view
wasUserAction标识是否是用户动作 Identifies whether it is a user action

◆ mapView:mapWillMoveByUser:

- (void) mapView: (MAMapView *)  mapView
mapWillMoveByUser: (BOOL)  wasUserAction 
optional

地图将要发生移动时调用此接口 This interface will be called when the map is about to move

Parameters
mapView地图view Map view
wasUserAction标识是否是用户动作 Identifies whether it is a user action

◆ mapView:mapWillZoomByUser:

- (void) mapView: (MAMapView *)  mapView
mapWillZoomByUser: (BOOL)  wasUserAction 
optional

地图将要发生缩放时调用此接口 This interface is called when the map is about to zoom

Parameters
mapView地图view Map view
wasUserAction标识是否是用户动作 Identifies whether it is a user action

◆ mapView:regionDidChangeAnimated:

- (void) mapView: (MAMapView *)  mapView
regionDidChangeAnimated: (BOOL)  animated 
optional

地图区域改变完成后会调用此接口 This interface will be called after the map region change is completed

Parameters
mapView地图View Map View
animated是否动画 Whether to animate

◆ mapView:regionDidChangeAnimated:wasUserAction:

- (void) mapView: (MAMapView *)  mapView
regionDidChangeAnimated: (BOOL)  animated
wasUserAction: (BOOL)  wasUserAction 
optional

地图区域改变完成后会调用此接口,如实现此接口则不会触发回掉mapView:regionDidChangeAnimated: This interface will be called after the map region change is completed,and if this interface is implemented, the callback mapView:regionDidChangeAnimated: will not be triggered

Parameters
mapView地图View Map View
animated是否动画 Whether to animate
wasUserAction标识是否是用户动作 Indicates whether it is a user action

◆ mapView:regionWillChangeAnimated:

- (void) mapView: (MAMapView *)  mapView
regionWillChangeAnimated: (BOOL)  animated 
optional

地图区域即将改变时会调用此接口 This interface will be called when the map region is about to change

Parameters
mapView地图View Map View
animated是否动画 Whether to animate

◆ mapView:regionWillChangeAnimated:wasUserAction:

- (void) mapView: (MAMapView *)  mapView
regionWillChangeAnimated: (BOOL)  animated
wasUserAction: (BOOL)  wasUserAction 
optional

地图区域即将改变时会调用此接口,如实现此接口则不会触发回掉mapView:regionWillChangeAnimated: This interface will be called when the map region is about to change, and if this interface is implemented, the callback mapView:regionWillChangeAnimated: will not be triggered

Parameters
mapView地图View Map View
animated是否动画 Whether to animate
wasUserAction标识是否是用户动作 Indicates whether it is a user action

◆ mapView:rendererForOverlay:

- (MAOverlayRenderer *) mapView: (MAMapView *)  mapView
rendererForOverlay: (id< MAOverlay >)  overlay 
optional

根据overlay生成对应的Renderer Generate the corresponding Renderer based on the overlay

Parameters
mapView地图View Map view
overlay指定的overlay the specified overlay
Returns
生成的覆盖物Renderer the generated overlay Renderer

◆ mapView:viewForAnnotation:

- (MAAnnotationView *) mapView: (MAMapView *)  mapView
viewForAnnotation: (id< MAAnnotation >)  annotation 
optional

根据anntation生成对应的View。 Generate corresponding View based on annotation.

注意: Note: 1、5.1.0后由于定位蓝点增加了平滑移动功能,如果在开启定位的情况先添加annotation,需要在此回调方法中判断annotation是否为MAUserLocation,从而返回正确的View。 if ([annotation isKindOfClass:[MAUserLocation class]]) { return nil; } After version 5.1.0, the positioning blue dot has added a smooth movement function. If you add an annotation while the positioning is turned on,it is necessary to determine whether the annotation is MAUserLocation in this callback method in order to return the correct View. if ([annotation isKindOfClass:[MAUserLocation class]]) { return nil; }

2、请不要在此回调中对annotation进行select和deselect操作,此时annotationView还未添加到mapview。 Please do not perform select or deselect operations on the annotation in this callback, as the annotationView has not been added to the mapView yet.

Parameters
mapView地图View Map view
annotation指定的标注 Specified annotation
Returns
生成的标注View Generated annotation View

◆ mapViewDidFailLoadingMap:withError:

- (void) mapViewDidFailLoadingMap: (MAMapView *)  mapView
withError: (NSError *)  error 
optional

地图加载失败 The map fails to load

Parameters
mapView地图View Map view
error错误信息 Error message

◆ mapViewDidFinishLoadingMap:

- (void) mapViewDidFinishLoadingMap: (MAMapView *)  mapView
optional

地图加载成功 The map is loaded successfully

Parameters
mapView地图View Map view

◆ mapViewDidStopLocatingUser:

- (void) mapViewDidStopLocatingUser: (MAMapView *)  mapView
optional

在地图View停止定位后,会调用此函数 This function will be called after the MapView stops locating

Parameters
mapView地图View Map view

◆ mapViewRegionChanged:

- (void) mapViewRegionChanged: (MAMapView *)  mapView
optional

地图区域改变过程中会调用此接口 since 4.6.0 This interface will be called during the map region change process. since 4.6.0

Parameters
mapView地图View Map View

◆ mapViewRequireLocationAuth:

- (void) mapViewRequireLocationAuth: (CLLocationManager *)  locationManager
optional

当plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription,并且[CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined,会调用代理的此方法。 此方法实现调用后台权限API即可( 该回调必须实现 [locationManager requestAlwaysAuthorization] ); since 6.8.0 When the plist is configured with NSLocationAlwaysUsageDescription or NSLocationAlwaysAndWhenInUseUsageDescription, and [CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined, this method of the delegate will be called. This method just needs to call the background permission API (this callback must implement [locationManager requestAlwaysAuthorization]); since 6.8.0

Parameters
locationManager地图的CLLocationManager。 Map's CLLocationManager

◆ mapViewWillStartLoadingMap:

- (void) mapViewWillStartLoadingMap: (MAMapView *)  mapView
optional

地图开始加载 The map starts loading

Parameters
mapView地图View Map view

◆ mapViewWillStartLocatingUser:

- (void) mapViewWillStartLocatingUser: (MAMapView *)  mapView
optional

在地图View将要启动定位时,会调用此函数 This function is called when the map view is about to start positioning

Parameters
mapView地图View Map view

◆ offlineDataDidReload:

- (void) offlineDataDidReload: (MAMapView *)  mapView
optional

离线地图数据加载完成, 调用reloadMap会触发该回调,离线数据生效后的回调. Offline map data loading completed. Calling reloadMap will trigger this callback, which is the callback after the offline data takes effect.

Parameters
mapView地图View, Map view

◆ offlineDataWillReload:

- (void) offlineDataWillReload: (MAMapView *)  mapView
optional

离线地图数据将要被加载, 调用reloadMap会触发该回调,离线数据生效前的回调. Offline map data is about to be loaded, calling reloadMap will trigger this callback, the callback before the offline data takes effect.

Parameters
mapView地图View Map view

The documentation for this protocol was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。