高德地图SDK(导航) V11.2.0501

Loading...
Searching...
No Matches
Instance Methods | Class Methods | Protected Types | Properties | List of all members
MAMapView Class Reference

`#include <MAMapView.h>`

Inheritance diagram for MAMapView:

## Instance Methods
(NSDictionary< NSNumber *, UIColor * > *trafficStatus) | - __attribute
(BOOL openGLESDisabled) | - __attribute
(instancetype) | - initWithFrame:isNavi:
| 导航模式下初始化地图，当需要将地图传给导航SDK时，请使用此方法创建地图，并设置isNavi为YES Initialize the map in navigation mode. When you need to pass the map to the navigation SDK, use this method to create the map and set isNavi to YES
(instancetype) | - initWithFrame:scaleFactor:
| 强制指定scaleFactor方式来初始化地图，原initWithFrame:方法自动根据系统scale初始化
(void) | - setRegion:animated:
| 设定当前地图的经纬度范围，该范围可能会被调整为适合地图窗口显示的范围 Set the latitude and longitude range of the current map, which may be adjusted to fit the map window
(MACoordinateRegion) | - regionThatFits:
| 根据当前地图视图frame的大小调整region范围 Adjust the region range according to the size of the current map view frame
(void) | - setVisibleMapRect:animated:
| 设置可见区域 Set the visible region
(MAMapRect) | - mapRectThatFits:
| 重新计算可见地图矩形区域,使之匹配mapview长宽比 Recalculate the visible map rectangle area to match the mapview aspect ratio
(MAMapRect) | - mapRectThatFits:edgePadding:
| 根据边缘插入来调整地图矩形区域，使之匹配mapview加insets后的长宽比 Adjust the map rectangular area according to the edge insertion to match the aspect ratio of the mapview with insets
(void) | - setVisibleMapRect:edgePadding:animated:
| 设置可见地图矩形区域 Set visible map rectangle area
(void) | - setVisibleMapRect:edgePadding:animated:duration:
| 设置可见地图矩形区域 Set visible map rectangle area
(void) | - setCenterCoordinate:animated:
| 设置当前地图的中心点，改变该值时，地图的比例尺级别不会发生变化 Set the center point of the current map. When this value is changed, the scale level of the map will not change
(void) | - setZoomLevel:animated:
| 设置缩放级别（默认3-19，有室内地图时为3-20） Set the zoom level (default 3-19, 3-20 when indoor maps are available)
(void) | - setZoomLevel:atPivot:animated:
| 根据指定的枢纽点来缩放地图 Zoom the map based on the specified pivot point
(void) | - setRotationDegree:animated:duration:
| 设置地图旋转角度(逆时针为正向) Set the map rotation angle (counterclockwise is positive)
(void) | - setCameraDegree:animated:duration:
| 设置地图相机角度(范围为[0.f, 60.f]，但高于40度的角度需要在16级以上才能生效) Set map camera angle (range [0.f, 60.f], but angles above 40 degrees require level 16 or higher to take effect)
(MAMapStatus *) | - getMapStatus
| 获取地图状态 Get map status
(void) | - setMapStatus:animated:
| 设置地图状态 Set map status
(void) | - setMapStatus:animated:duration:
| 设置地图状态 Set map status
(void) | - setCompassImage:
| 设置指南针的图片 Set compass image
(UIImage *) | - takeSnapshotInRect:
| 在指定区域内截图(默认会包含该区域内的annotationView),注意不要在地图回调方法内直接调用 Take screenshot in specified area (annotationView within the area will be included by default). Note: Do not call directly within map callback methods
(void) | - takeSnapshotInRect:withCompletionBlock:
| 异步在指定区域内截图(默认会包含该区域内的annotationView), 地图载入完整时回调 Asynchronously capture a screenshot within the specified area (by default includes the annotationView within that area), callback when the map is fully loaded
(void) | - takeSnapshotInRect:timeoutInterval:completionBlock:
| 异步在指定区域内截图(默认会包含该区域内的annotationView), 地图载入完整时回调 (since 7.8.0) Asynchronously capture a screenshot within the specified area (by default includes the annotationView within the area), callback when the map is fully loaded (since 7.8.0)
(double) | - metersPerPointForZoomLevel:
| 在指定的缩放级别下, 基于地图中心点, 1 screen point 对应的距离(单位是米). At a specified zoom level, based on the map center point, the distance corresponding to 1 screen point (in meters)
(CGPoint) | - convertCoordinate:toPointToView:
| 将经纬度转换为指定view坐标系的坐标 Convert latitude and longitude to coordinates in the specified view coordinate system
(CLLocationCoordinate2D) | - convertPoint:toCoordinateFromView:
| 将指定view坐标系的坐标转换为经纬度 Convert coordinates in the specified view coordinate system to latitude and longitude
(CGRect) | - convertRegion:toRectToView:
| 将经纬度region转换为指定view坐标系的rect Convert latitude and longitude region to rect in the specified view coordinate system
(MACoordinateRegion) | - convertRect:toRegionFromView:
| 将指定view坐标系的rect转换为经纬度region Convert the rect of the specified view coordinate system to a latitude and longitude region
(void) | - reloadMap
| 重新加载地图 Reload the map
(void) | - clearDisk
| 清除所有磁盘上缓存的地图数据(不包括离线地图) Clear all cached map data on disk (excluding offline maps)
(void) | - reloadInternalTexture
| 重新加载内部纹理，在纹理被错误释放时可以执行此方法。（since 5.4.0） Reload internal textures, this method can be executed when textures are incorrectly released.（since 5.4.0）
(NSString *) | - mapContentApprovalNumber
| 获取地图审图号。如果启用了“自定义样式”功能(customMapStyleEnabled 为 YES)，则返回nil。（since 5.4.0） Obtain the map approval number. If the 'Custom Style' feature is enabled (customMapStyleEnabled is YES), return nil.（since 5.4.0）
(NSString *) | - satelliteImageApprovalNumber
| 获取卫星图片审图号。（since 5.4.0） Obtain satellite image approval number （since 5.4.0）
(NSString *) | - terrainApprovalNumber
| 获取地形图审图号。（since 8.2.0） Obtain topographic map approval number（since 8.2.0）
(void) | - addAnimationWith:zoomAnimation:rotateAnimation:cameraDegreeAnimation:
| 添加CAKeyframeAnimation动画。（since 6.0.0） Add CAKeyframeAnimation（since 6.0.0）
(void) | - forceRefresh
| 强制刷新。（since 6.0.0） Force refresh
(void) | - setConstructingRoadEnable:
| 设置在建道路图层是否显示。默认NO（since 7.7.0） Set whether the road under construction layer is displayed. Default NO（since 7.7.0）
(void) | - setMapOptRecordState:
(instancetype) | - initWithFrame:carPlay:
(void) | - addAnnotation:
| 向地图窗口添加标注，需要实现MAMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View To add annotations to the map window, you need to implement the -mapView:viewForAnnotation: function of MAMapViewDelegate to generate the corresponding view for the annotation
(void) | - addAnnotations:
| 向地图窗口添加一组标注，需要实现MAMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View To add a set of annotations to the map window, you need to implement the -mapView:viewForAnnotation: function of MAMapViewDelegate to generate the corresponding view for the annotation
(void) | - removeAnnotation:
| 移除标注 Remove annotation
(void) | - removeAnnotations:
| 移除一组标注 Remove a group of annotations
(NSSet *) | - annotationsInMapRect:
| 获取指定投影矩形范围内的标注 Get annotations within the specified projected rectangle
(MAAnnotationView *) | - viewForAnnotation:
| 根据标注数据获取标注view Get annotation view from annotation data
(MAAnnotationView *) | - dequeueReusableAnnotationViewWithIdentifier:
| 从复用内存池中获取制定复用标识的annotation view Retrieve annotation view with specified reuse identifier from reuse memory pool
(void) | - selectAnnotation:animated:
| 选中标注数据对应的view。注意：如果annotation对应的annotationView因不在屏幕范围内而被移入复用池，为了完成选中操作，会将对应的annotationView添加到地图上，并将地图中心点移至annotation.coordinate的位置。 Select the view corresponding to the annotation data. Note: If the annotationView corresponding to the annotation is moved into the reuse pool because it is not within the screen range,To complete the selection operation, the corresponding annotationView will be added to the map, and the center point of the map will be moved to the position of annotation.coordinate.
(void) | - deselectAnnotation:animated:
| 取消选中标注数据对应的view Deselect the view corresponding to the annotation data
(void) | - showAnnotations:animated:
| 设置地图使其可以显示数组中所有的annotation, 如果数组中只有一个则直接设置地图中心为annotation的位置。 Configure the map to display all annotations in the array. If there is only one annotation in the array, directly set the map center to the location of the annotation.
(void) | - showAnnotations:edgePadding:animated:
| 设置地图使其可以显示数组中所有的annotation, 如果数组中只有一个则直接设置地图中心为annotation的位置。 Configure the map to display all annotations in the array. If there is only one annotation in the array, directly set the map center to the location of the annotation.
(NSInteger) | - hideBuildingsWithPolygon:polygonSize:
| 隐藏建筑物 Hide buildings
(void) | - showHiddenBuildingsWithOperationId:
| 显示建筑物 Display buildings
(void) | - setCustomMapStyleOptions:
| 自定义地图样式设置,可以支持分级样式配置，如控制不同级别显示不同的颜色(自7.0.0开始样式有更新，旧的样式文件不能继续使用，必须到官网重新导出新样式文件。 自6.6.0开始使用新版样式，旧版样式无法在新版接口setCustomMapStyleOptions:(MAMapCustomStyleOptions *)styleOptions中使用，请到官网(lbs.amap.com)更新新版样式文件.) Custom map style settings support hierarchical style configurations, such as controlling different levels to display different colors (since version 7.0.0, the style has been updated, and old style files can no longer be used. You must re-export the new style file from the official website.From version 6.6.0, the new style is in use. The old style cannot be used in the new interface setCustomMapStyleOptions:(MAMapCustomStyleOptions *)styleOptions. Please update the new style file on the official website (lbs.amap.com).)
(void) | - addEngineOverlay:
| 向地图窗口添加Overlay。 Add Overlay to the map window
(NSArray *) | - overlaysInLevel:
| 取位于level下的overlays Get overlays under level
(void) | - addOverlay:
| 向地图窗口添加Overlay。 Add Overlay to the map window 需要实现MAMapViewDelegate的-mapView:rendererForOverlay:函数来生成标注对应的Renderer。 Need to implement the -mapView:rendererForOverlay: function of MAMapViewDelegate to generate the corresponding Renderer for the annotation. 默认添加层级：MAGroundOverlay默认层级为MAOverlayLevelAboveRoads，其余overlay类型默认层级为MAOverlayLevelAboveLabels Default level for adding: MAGroundOverlay's default level is MAOverlayLevelAboveRoads, while other overlay types default to MAOverlayLevelAboveLabels.
(void) | - addOverlays:
| 向地图窗口添加一组Overlay，需要实现MAMapViewDelegate的-mapView:rendererForOverlay:函数来生成标注对应的Renderer To add a set of Overlays to the map window, you need to implement the -mapView:rendererForOverlay: function of MAMapViewDelegate to generate the corresponding Renderer for the annotation 默认添加层级：MAOverlayLevelAboveLabels Default level for adding: MAOverlayLevelAboveLabels
(void) | - addOverlay:level:
| 向地图窗口添加Overlay，需要实现MAMapViewDelegate的-mapView:rendererForOverlay:函数来生成标注对应的Renderer Add Overlay to the map window，need to implement the -mapView:rendererForOverlay: function of MAMapViewDelegate to generate the corresponding Renderer for the annotation.
(void) | - addOverlays:level:
| 向地图窗口添加一组Overlay，需要实现MAMapViewDelegate的-mapView:rendererForOverlay:函数来生成标注对应的Renderer To add a set of Overlays to the map window，need to implement the -mapView:rendererForOverlay: function of MAMapViewDelegate to generate the corresponding Renderer for the annotation.
(void) | - removeOverlay:
| 移除Overlay Remove Overlay
(void) | - removeOverlays:
| 移除一组Overlay Remove a group of Overlays
(void) | - insertOverlay:atIndex:level:
| 在指定层级的指定的索引处添加一个Overlay Add an overlay at the specified index of the specified level
(void) | - insertOverlay:aboveOverlay:
| 在指定的Overlay之上插入一个overlay Insert an overlay above the specified overlay
(void) | - insertOverlay:belowOverlay:
| 在指定的Overlay之下插入一个overlay Insert an overlay below the specified overlay
(void) | - insertOverlay:atIndex:
| 在指定的索引处添加一个Overlay Add an Overlay at the specified index
(void) | - exchangeOverlayAtIndex:withOverlayAtIndex:
| 在MAOverlayLevelAboveLabels上交换指定索引处的Overlay swap the Overlay at the specified index on MAOverlayLevelAboveLabels
(void) | - exchangeOverlayAtIndex:withOverlayAtIndex:atLevel:
| 交换指定索引处的Overlay Swap Overlay at specified index
(void) | - exchangeOverlay:withOverlay:
| 交换两个overlay Swap two overlays
(MAOverlayRenderer *) | - rendererForOverlay:
| 查找指定overlay对应的Renderer，如果该View尚未创建，返回nil Find the Renderer corresponding to the specified overlay, returns nil if the View has not been created
(void) | - showOverlays:animated:
| 设置地图使其可以显示数组中所有的overlay, 如果数组中只有一个则直接设置地图中心为overlay的位置。 Set the map to display all overlays in the array, if there is only one in the array, directly set the map center to the location of the overlay.
(void) | - showOverlays:edgePadding:animated:
| 设置地图使其可以显示数组中所有的overlay, 如果数组中只有一个则直接设置地图中心为overlay的位置。 Set the map to display all overlays in the array, if there is only one in the array, directly set the map center to the location of the overlay.
(NSArray *) | - getHittedPolylinesWith:traverseAll:
| 获取点击选中的polylineRenderer, 注意：开启polylineRenderer的点击选中功能，需设置userInteractionEnabled=YES。since 7.1.0 obtain the selected polylineRenderer by clicking, note: to enable the click selection function of polylineRenderer, userInteractionEnabled=YES needs to be set. since 7.1.0
(void) | - setCurrentLocation:
| 多语言设置经纬度 Multilingual setting of latitude and longitude
(void) | - addPoiFilter:
| 添加poi避让框 Add POI avoidance frame
(void) | - removePoiFilter:
| 移除poi避让框 Remove POI avoidance frame
(void) | - clearPoiFilter
| 清除poi避让框 Clear POI avoidance frame
(void) | - setUserTrackingMode:animated:
| 设置定位用户位置的模式 Set the mode for locating the user's position
(void) | - updateUserLocationRepresentation:
| 设定UserLocationView样式。如果用户自定义了userlocation的annotationView，或者该annotationView还未添加到地图上，此方法将不起作用 Set the style of UserLocationView. If the user has customized the annotationView for userlocation, or if the annotationView has not been added to the map yet, this method will not work.

## Class Methods
(void) | + updatePrivacyShow:privacyInfo:
| 更新App是否显示隐私弹窗的状态，隐私弹窗是否包含高德SDK隐私协议内容的状态. 注意：必须在MAMapView实例化之前调用 since 8.1.0 Update the status of whether the app displays a privacy popup and whether the popup includes the content of the Amap SDK privacy agreement. Note: This must be called before the MAMapView is instantiated. since 8.1.0
(void) | + updatePrivacyAgree:
| 更新用户授权高德SDK隐私协议状态. 注意：必须在MAMapView实例化之前调用 since 8.1.0 Updates the user's authorization status for the AMap SDK privacy agreement. Note: Must be called before the instantiation of MAMapView. since 8.1.0
(NSInteger) | + setBundlePath:

## Protected Types
typedef void(^ | MATileLoadCallback) (BOOL success, int64_t durationMs, NSString *tileIdentifier)
| 瓦片加载回调

## Properties
BOOL | metalEnabled
BOOL | terrainEnabled
BOOL | terrainAuth
id< MAMapViewDelegate > | delegate
MAMapType | mapType
CLLocationCoordinate2D | centerCoordinate
MACoordinateRegion | region
MAMapRect | visibleMapRect
MACoordinateRegion | limitRegion
MAMapRect | limitMapRect
CGFloat | zoomLevel
CGFloat | minZoomLevel
CGFloat | maxZoomLevel
CGFloat | rotationDegree
CGFloat | cameraDegree
BOOL | zoomingInPivotsAroundAnchorPoint
BOOL | zoomEnabled
BOOL | scrollEnabled
BOOL | rotateEnabled
BOOL | rotateCameraEnabled
BOOL | showsBuildings
BOOL | showsLabels
BOOL | showTraffic
BOOL | touchPOIEnabled
BOOL | showsCompass
CGPoint | compassOrigin
CGSize | compassSize
MAScaleControlsUnit | scaleControlsUnit
BOOL | showsScale
CGPoint | scaleOrigin
CGSize | scaleSize
CGPoint | logoCenter
CGSize | logoSize
BOOL | logoEnable
MALogoLanguage | logoLanguage
double | metersPerPointForCurrentZoom
BOOL | isAbroad
NSUInteger | maxRenderFrame
BOOL | isAllowDecreaseFrame
BOOL | renderringDisabled
BOOL | drawingDisabled
| 是否强制关闭render，默认NO.地图元素完全不创建
CGPoint | screenAnchor
MATileLoadCallback | tileLoadCallback
NSRunLoopMode | runLoopMode
BOOL | loadWorldVectorMap
BOOL | showPrivatePark
NSArray * | annotations
NSArray * | selectedAnnotations
CGRect | annotationVisibleRect
BOOL | customMapStyleEnabled
NSArray * | overlays
BOOL | showsUserLocation
MAUserLocation * | userLocation
BOOL | customizeUserLocationAccuracyCircleRepresentation
MACircle * | userLocationAccuracyCircle
MAUserTrackingMode | userTrackingMode
BOOL | userLocationVisible
CLLocationDistance | distanceFilter
CLLocationAccuracy | desiredAccuracy
CLLocationDegrees | headingFilter
BOOL | pausesLocationUpdatesAutomatically
BOOL | allowsBackgroundLocationUpdates

## Member Typedef Documentation

## ◆ MATileLoadCallback

- (typedef void(^ MATileLoadCallback) (BOOL success, int64_t durationMs, NSString *tileIdentifier))
| protected

瓦片加载回调

Parameters

  success | 加载是否成功
  durationMs | 耗时（毫秒）
  tileIdentifier | 瓦片唯一标识

## Method Documentation

## ◆ __attribute [1/2]

- (NSDictionary< NSNumber *, UIColor * > *trafficStatus) __attribute |  | ((deprecated("Deprecated since 7.8.0"))) |  |

设置实时交通颜色,key为 MATrafficStatus set real-time traffic color, key is MATrafficStatus

## ◆ __attribute [2/2]

- (BOOL openGLESDisabled) __attribute |  | ((deprecated("Deprecated, since 7.9.0, please use the renderringDisabled property"))) |  |

停止/开启 OpenGLES绘制, 默认NO. 对应回调是 - (void)mapView:(MAMapView *) didChangeOpenGLESDisabled:(BOOL) Stop/Start OpenGLES rendering, default NO. The corresponding callback is - (void)mapView:(MAMapView *) didChangeOpenGLESDisabled:(BOOL)

## ◆ addAnimationWith:zoomAnimation:rotateAnimation:cameraDegreeAnimation:

- (void) addAnimationWith: |  | (CAKeyframeAnimation *) | mapCenterAnimation
zoomAnimation: |  | (CAKeyframeAnimation *) | zoomAnimation
rotateAnimation: |  | (CAKeyframeAnimation *) | rotateAnimation
cameraDegreeAnimation: |  | (CAKeyframeAnimation *) | cameraDegreeAnimation

添加CAKeyframeAnimation动画。（since 6.0.0） Add CAKeyframeAnimation（since 6.0.0）

Parameters

  mapCenterAnimation | 地图中心点动画 Map center point animation
  zoomAnimation | 放大缩小动画 Zoom in/out animation
  rotateAnimation | 旋转动画 Rotation animation
  cameraDegreeAnimation | 仰角动画 Elevation animation

## ◆ addAnnotation:

- (void) addAnnotation: |  | (id< MAAnnotation >) | annotation |

向地图窗口添加标注，需要实现MAMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View To add annotations to the map window, you need to implement the -mapView:viewForAnnotation: function of MAMapViewDelegate to generate the corresponding view for the annotation

Parameters

  annotation | 要添加的标注 Annotation to be added

Provided by category MAMapView(Annotation).

## ◆ addAnnotations:

- (void) addAnnotations: |  | (NSArray *) | annotations |

向地图窗口添加一组标注，需要实现MAMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View To add a set of annotations to the map window, you need to implement the -mapView:viewForAnnotation: function of MAMapViewDelegate to generate the corresponding view for the annotation

Parameters

  annotations | 要添加的标注数组 Array of annotations to add

Provided by category MAMapView(Annotation).

## ◆ addEngineOverlay:

- (void) addEngineOverlay: |  | (MABaseEngineOverlay *) | overlay |

向地图窗口添加Overlay。 Add Overlay to the map window

Parameters

  overlay | 要添加的engine overlay The engine overlay to be added

Provided by category MAMapView(EngineOverlay).

## ◆ addOverlay:

- (void) addOverlay: |  | (id< MAOverlay >) | overlay |

向地图窗口添加Overlay。 Add Overlay to the map window 需要实现MAMapViewDelegate的-mapView:rendererForOverlay:函数来生成标注对应的Renderer。 Need to implement the -mapView:rendererForOverlay: function of MAMapViewDelegate to generate the corresponding Renderer for the annotation. 默认添加层级：MAGroundOverlay默认层级为MAOverlayLevelAboveRoads，其余overlay类型默认层级为MAOverlayLevelAboveLabels Default level for adding: MAGroundOverlay's default level is MAOverlayLevelAboveRoads, while other overlay types default to MAOverlayLevelAboveLabels.

Parameters

  overlay | 要添加的overlay Overlay to be added

Provided by category MAMapView(Overlay).

## ◆ addOverlay:level:

- (void) addOverlay: |  | (id< MAOverlay >) | overlay
level: |  | (MAOverlayLevel) | level

向地图窗口添加Overlay，需要实现MAMapViewDelegate的-mapView:rendererForOverlay:函数来生成标注对应的Renderer Add Overlay to the map window，need to implement the -mapView:rendererForOverlay: function of MAMapViewDelegate to generate the corresponding Renderer for the annotation.

Parameters

  overlay | 要添加的overlay Overlay to be added
  level | 添加的overlay所在层级 The level of the added overlay

Provided by category MAMapView(Overlay).

## ◆ addOverlays:

- (void) addOverlays: |  | (NSArray *) | overlays |

向地图窗口添加一组Overlay，需要实现MAMapViewDelegate的-mapView:rendererForOverlay:函数来生成标注对应的Renderer To add a set of Overlays to the map window, you need to implement the -mapView:rendererForOverlay: function of MAMapViewDelegate to generate the corresponding Renderer for the annotation 默认添加层级：MAOverlayLevelAboveLabels Default level for adding: MAOverlayLevelAboveLabels

Parameters

  overlays | 要添加的overlay数组 Array of overlays to be added

Provided by category MAMapView(Overlay).

## ◆ addOverlays:level:

- (void) addOverlays: |  | (NSArray *) | overlays
level: |  | (MAOverlayLevel) | level

向地图窗口添加一组Overlay，需要实现MAMapViewDelegate的-mapView:rendererForOverlay:函数来生成标注对应的Renderer To add a set of Overlays to the map window，need to implement the -mapView:rendererForOverlay: function of MAMapViewDelegate to generate the corresponding Renderer for the annotation.

Parameters

  overlays | 要添加的overlay数组 Array of overlays to be added
  level | 添加的overlay所在层级 The level of the added overlay

Provided by category MAMapView(Overlay).

## ◆ addPoiFilter:

- (void) addPoiFilter: |  | (MAPoiFilter *) | poiFilter |

添加poi避让框 Add POI avoidance frame

Parameters

  poiFilter |

Provided by category MAMapView(PoiFilter).

## ◆ annotationsInMapRect:

- (NSSet *) annotationsInMapRect: |  | (MAMapRect) | mapRect |

获取指定投影矩形范围内的标注 Get annotations within the specified projected rectangle

Parameters

  mapRect | 投影矩形范围 Projected rectangle bounds

Returns
  标注集合 Annotation collection

Provided by category MAMapView(Annotation).

## ◆ clearDisk

- (void) clearDisk |  |  |

清除所有磁盘上缓存的地图数据(不包括离线地图) Clear all cached map data on disk (excluding offline maps)

## ◆ clearPoiFilter

- (void) clearPoiFilter |  |  |

清除poi避让框 Clear POI avoidance frame

Provided by category MAMapView(PoiFilter).

## ◆ convertCoordinate:toPointToView:

- (CGPoint) convertCoordinate: |  | (CLLocationCoordinate2D) | coordinate
toPointToView: |  | (UIView *) | view

将经纬度转换为指定view坐标系的坐标 Convert latitude and longitude to coordinates in the specified view coordinate system

Parameters

  coordinate | 经纬度 Latitude and longitude
  view | 指定的view Specified view

Returns
  基于指定view坐标系的坐标 Coordinates based on the specified view coordinate system

## ◆ convertPoint:toCoordinateFromView:

- (CLLocationCoordinate2D) convertPoint: |  | (CGPoint) | point
toCoordinateFromView: |  | (UIView *) | view

将指定view坐标系的坐标转换为经纬度 Convert coordinates in the specified view coordinate system to latitude and longitude

Parameters

  point | 指定view坐标系的坐标 Coordinates in the specified view coordinate system
  view | 指定的view Specified view

Returns
  经纬度 Latitude and longitude

## ◆ convertRect:toRegionFromView:

- (MACoordinateRegion) convertRect: |  | (CGRect) | rect
toRegionFromView: |  | (UIView *) | view

将指定view坐标系的rect转换为经纬度region Convert the rect of the specified view coordinate system to a latitude and longitude region

Parameters

  rect | 指定view坐标系的rect Specify the rect of the view coordinate system
  view | 指定的view Specified view

Returns
  经纬度region Latitude and longitude region

## ◆ convertRegion:toRectToView:

- (CGRect) convertRegion: |  | (MACoordinateRegion) | region
toRectToView: |  | (UIView *) | view

将经纬度region转换为指定view坐标系的rect Convert latitude and longitude region to rect in the specified view coordinate system

Parameters

  region | 经纬度region Latitude and longitude region
  view | 指定的view Specified view

Returns
  指定view坐标系的rect Specify the rect of the view coordinate system

## ◆ dequeueReusableAnnotationViewWithIdentifier:

- (MAAnnotationView *) dequeueReusableAnnotationViewWithIdentifier: |  | (NSString *) | identifier |

从复用内存池中获取制定复用标识的annotation view Retrieve annotation view with specified reuse identifier from reuse memory pool

Parameters

  identifier | 复用标识 Reuse identifier

Returns
  annotation view annotation view

Provided by category MAMapView(Annotation).

## ◆ deselectAnnotation:animated:

- (void) deselectAnnotation: |  | (id< MAAnnotation >) | annotation
animated: |  | (BOOL) | animated

取消选中标注数据对应的view Deselect the view corresponding to the annotation data

Parameters

  annotation | 标注数据 Annotation data
  animated | 是否有动画效果 Whether there is an animation effect

Provided by category MAMapView(Annotation).

## ◆ exchangeOverlay:withOverlay:

- (void) exchangeOverlay: |  | (id< MAOverlay >) | overlay1
withOverlay: |  | (id< MAOverlay >) | overlay2

交换两个overlay Swap two overlays

Parameters

  overlay1 | overlay1
  overlay2 | overlay2

Provided by category MAMapView(Overlay).

## ◆ exchangeOverlayAtIndex:withOverlayAtIndex:

- (void) exchangeOverlayAtIndex: |  | (NSUInteger) | index1
withOverlayAtIndex: |  | (NSUInteger) | index2

在MAOverlayLevelAboveLabels上交换指定索引处的Overlay swap the Overlay at the specified index on MAOverlayLevelAboveLabels

Parameters

  index1 | 索引1 index 1
  index2 | 索引2 index 2

Provided by category MAMapView(Overlay).

## ◆ exchangeOverlayAtIndex:withOverlayAtIndex:atLevel:

- (void) exchangeOverlayAtIndex: |  | (NSUInteger) | index1
withOverlayAtIndex: |  | (NSUInteger) | index2
atLevel: |  | (MAOverlayLevel) | level

交换指定索引处的Overlay Swap Overlay at specified index

Parameters

  index1 | 索引1 index 1
  index2 | 索引2 index 2
  level | 所处层级 Current hierarchy level

Provided by category MAMapView(Overlay).

## ◆ forceRefresh

- (void) forceRefresh |  |  |

强制刷新。（since 6.0.0） Force refresh

## ◆ getHittedPolylinesWith:traverseAll:

- (NSArray *) getHittedPolylinesWith: |  | (CLLocationCoordinate2D) | tappedCoord
traverseAll: |  | (BOOL) | traverseAll

获取点击选中的polylineRenderer, 注意：开启polylineRenderer的点击选中功能，需设置userInteractionEnabled=YES。since 7.1.0 obtain the selected polylineRenderer by clicking, note: to enable the click selection function of polylineRenderer, userInteractionEnabled=YES needs to be set. since 7.1.0

Parameters

  tappedCoord | 点击点的坐标 Coordinates of the clicked point
  traverseAll | 如果有polyline重合情况，是否返回多个。NO: 只返回最上面的 YES:返回所有 If there is an overlap of polylines, whether to return multiple. NO: Only return the topmost one YES: Return all

Returns
  返回选中的polylineRenderer数组，最上面的在第一个 Return the selected polylineRenderer array, with the topmost one first

Provided by category MAMapView(Overlay).

## ◆ getMapStatus

- (MAMapStatus *) getMapStatus |  |  |

获取地图状态 Get map status

Returns
  地图状态 Map status

## ◆ hideBuildingsWithPolygon:polygonSize:

- (NSInteger) hideBuildingsWithPolygon: |  | (CLLocationCoordinate2D *) | polygon
polygonSize: |  | (NSUInteger) | polygonSize

隐藏建筑物 Hide buildings

Parameters

  polygon | 围栏的经纬度信息 Fence's latitude and longitude information
  polygonSize | 围栏的size（需 >= 3 否则无法构成围栏） Fence size (must be >=3 otherwise cannot form a fence)

Returns
  隐藏成功返回当前的operationId（>= 0） 失败返回-1 Returns current operationId (>=0) if successful, -1 if failed

Provided by category MAMapView(Buildings).

## ◆ initWithFrame:carPlay:

- (instancetype) initWithFrame: |  | (CGRect) | frame
carPlay: |  | (BOOL) | isCarPlay

初始化地图实例 Initialize map instance

- Parameters:
  - frame: 地图frame Map frame
  - isCarPlay: 是否为CarPlay页面的地图，设置为YES时，会对地图做CarPlay的UI适配处理 Whether it is a map for the CarPlay page. When set to YES, the map will be adapted for CarPlay UI. 注意：CarPlay功能是商业付费功能，需要先联系商务开通权限后才可正常使用 Note: CarPlay is a paid commercial feature that requires contacting the business department to activate permissions before it can be used normally 该拓展类为CarPlay场景专用，由此方法创建的地图对象，传递给导航自定义View（AMapNaviDriveView或AMapNaviRideView）后，导航自定义View会对地图 This extension class is specifically designed for CarPlay scenarios. The map object created by this method, when passed to the navigation custom View (AMapNaviDriveView or AMapNaviRideView), will affect the map 对象持续得做展示范围控制等UI操作，为避免地图对象操控冲突，应尽量避免直接使用该地图对象做UI操作（如zoom调整，中心移动等） The map object continuously performs UI operations such as view range control. To avoid conflicts in map manipulation, direct use of this map object for UI operations (e.g., zoom adjustment, center movement) should be avoided as much as possible.

Provided by category MAMapView(AMapCarPlay).

## ◆ initWithFrame:isNavi:

- (instancetype) initWithFrame: |  | (CGRect) | frame
isNavi: |  | (BOOL) | isNavi

导航模式下初始化地图，当需要将地图传给导航SDK时，请使用此方法创建地图，并设置isNavi为YES Initialize the map in navigation mode. When you need to pass the map to the navigation SDK, use this method to create the map and set isNavi to YES

Parameters

  frame | 地图 frame map frame
  isNavi | 是否是导航模式 whether it is in navigation mode

## ◆ initWithFrame:scaleFactor:

- (instancetype) initWithFrame: |  | (CGRect) | frame
scaleFactor: |  | (CGFloat) | scaleFactor

强制指定scaleFactor方式来初始化地图，原initWithFrame:方法自动根据系统scale初始化

Parameters

  frame | 如系统initWithFrame:参数
  scaleFactor | 强制指定屏幕scaleFactor.0.0是走系统默认值,非0值生效。支持范围是[0-3] since 10.5.2.03

## ◆ insertOverlay:aboveOverlay:

- (void) insertOverlay: |  | (id< MAOverlay >) | overlay
aboveOverlay: |  | (id< MAOverlay >) | sibling

在指定的Overlay之上插入一个overlay Insert an overlay above the specified overlay

Parameters

  overlay | 带添加的Overlay Overlay with addition
  sibling | 用于指定相对位置的Overlay Overlay for specifying relative position

Provided by category MAMapView(Overlay).

## ◆ insertOverlay:atIndex:

- (void) insertOverlay: |  | (id< MAOverlay >) | overlay
atIndex: |  | (NSUInteger) | index

在指定的索引处添加一个Overlay Add an Overlay at the specified index

Parameters

  overlay | 要添加的overlay Overlay to be added
  index | 指定的索引 the specified index

Provided by category MAMapView(Overlay).

## ◆ insertOverlay:atIndex:level:

- (void) insertOverlay: |  | (id< MAOverlay >) | overlay
atIndex: |  | (NSUInteger) | index
level: |  | (MAOverlayLevel) | level

在指定层级的指定的索引处添加一个Overlay Add an overlay at the specified index of the specified level

Parameters

  overlay | 要添加的overlay Overlay to be added
  index | 指定的索引 Specified index
  level | Specified level

注：各个层级的索引分开计数； Note: The indexes of each level are counted separately 若index大于level层级的最大索引，则添加至level层级的最大索引之后。 If the index is greater than the maximum index of the level, it will be added after the maximum index of the level

Provided by category MAMapView(Overlay).

## ◆ insertOverlay:belowOverlay:

- (void) insertOverlay: |  | (id< MAOverlay >) | overlay
belowOverlay: |  | (id< MAOverlay >) | sibling

在指定的Overlay之下插入一个overlay Insert an overlay below the specified overlay

Parameters

  overlay | 带添加的Overlay Overlay with addition
  sibling | 用于指定相对位置的Overlay Overlay for specifying relative position

Provided by category MAMapView(Overlay).

## ◆ mapContentApprovalNumber

- (NSString *) mapContentApprovalNumber |  |  |

获取地图审图号。如果启用了“自定义样式”功能(customMapStyleEnabled 为 YES)，则返回nil。（since 5.4.0） Obtain the map approval number. If the 'Custom Style' feature is enabled (customMapStyleEnabled is YES), return nil.（since 5.4.0）

Returns
  地图审图号 Map approval number

## ◆ mapRectThatFits:

- (MAMapRect) mapRectThatFits: |  | (MAMapRect) | mapRect |

重新计算可见地图矩形区域,使之匹配mapview长宽比 Recalculate the visible map rectangle area to match the mapview aspect ratio

Parameters

  mapRect | 要调整的地图矩形区域 the map rectangle area to be adjusted

Returns
  调整后的地图矩形区域 the adjusted map rectangle area

## ◆ mapRectThatFits:edgePadding:

- (MAMapRect) mapRectThatFits: |  | (MAMapRect) | mapRect
edgePadding: |  | (UIEdgeInsets) | insets

根据边缘插入来调整地图矩形区域，使之匹配mapview加insets后的长宽比 Adjust the map rectangular area according to the edge insertion to match the aspect ratio of the mapview with insets

Parameters

  mapRect | 要调整的地图矩形区域 the map rectangular area to be adjusted
  insets | 边缘插入 edge insertion

Returns
  调整后的地图矩形区域 the adjusted map rectangle area

## ◆ metersPerPointForZoomLevel:

- (double) metersPerPointForZoomLevel: |  | (CGFloat) | zoomLevel |

在指定的缩放级别下, 基于地图中心点, 1 screen point 对应的距离(单位是米). At a specified zoom level, based on the map center point, the distance corresponding to 1 screen point (in meters)

Parameters

  zoomLevel | 指定的缩放级别, 在[minZoomLevel, maxZoomLevel]范围内. the specified zoom level is within the [minZoomLevel, maxZoomLevel] range.

Returns
  对应的距离(单位是米) Corresponding distance (unit is meters)

## ◆ overlaysInLevel:

- (NSArray *) overlaysInLevel: |  | (MAOverlayLevel) | level |

取位于level下的overlays Get overlays under level

Parameters

  level | 层级 Level

Provided by category MAMapView(Overlay).

## ◆ regionThatFits:

- (MACoordinateRegion) regionThatFits: |  | (MACoordinateRegion) | region |

根据当前地图视图frame的大小调整region范围 Adjust the region range according to the size of the current map view frame

Parameters

  region | 要调整的经纬度范围 The latitude and longitude range to be adjusted

Returns
  调整后的经纬度范围 The adjusted latitude and longitude range

## ◆ reloadInternalTexture

- (void) reloadInternalTexture |  |  |

重新加载内部纹理，在纹理被错误释放时可以执行此方法。（since 5.4.0） Reload internal textures, this method can be executed when textures are incorrectly released.（since 5.4.0）

## ◆ reloadMap

- (void) reloadMap |  |  |

重新加载地图 Reload the map

将离线地图解压到 Documents/3dvmap/ 目录下后，调用此函数使离线数据生效, After extracting the offline map to the Documents/3dvmap/ directory, call this function to activate the offline data. 对应的回调分别是 offlineDataWillReload:(MAMapView *)mapView, offlineDataDidReload:(MAMapView *)mapView. The corresponding callbacks are offlineDataWillReload:(MAMapView *)mapView, offlineDataDidReload:(MAMapView *)mapView.

## ◆ removeAnnotation:

- (void) removeAnnotation: |  | (id< MAAnnotation >) | annotation |

移除标注 Remove annotation

Parameters

  annotation | 要移除的标注 Annotation to remove

Provided by category MAMapView(Annotation).

## ◆ removeAnnotations:

- (void) removeAnnotations: |  | (NSArray *) | annotations |

移除一组标注 Remove a group of annotations

Parameters

  annotations | 要移除的标注数组 Array of annotations to remove

Provided by category MAMapView(Annotation).

## ◆ removeOverlay:

- (void) removeOverlay: |  | (id< MAOverlay >) | overlay |

移除Overlay Remove Overlay

Parameters

  overlay | 要移除的overlay The overlay to be removed

Provided by category MAMapView(Overlay).

## ◆ removeOverlays:

- (void) removeOverlays: |  | (NSArray *) | overlays |

移除一组Overlay Remove a group of Overlays

Parameters

  overlays | 要移除的overlay数组 The array of overlays to be removed

Provided by category MAMapView(Overlay).

## ◆ removePoiFilter:

- (void) removePoiFilter: |  | (NSString *) | keyName |

移除poi避让框 Remove POI avoidance frame

Parameters

  keyName | 名称 Name

Provided by category MAMapView(PoiFilter).

## ◆ rendererForOverlay:

- (MAOverlayRenderer *) rendererForOverlay: |  | (id< MAOverlay >) | overlay |

查找指定overlay对应的Renderer，如果该View尚未创建，返回nil Find the Renderer corresponding to the specified overlay, returns nil if the View has not been created

Parameters

  overlay | 指定的overlay Specify the overlay

Returns
  指定overlay对应的Renderer Specify the Renderer corresponding to the overlay

Provided by category MAMapView(Overlay).

## ◆ satelliteImageApprovalNumber

- (NSString *) satelliteImageApprovalNumber |  |  |

获取卫星图片审图号。（since 5.4.0） Obtain satellite image approval number （since 5.4.0）

Returns
  卫星图片审图号 Satellite image approval number

## ◆ selectAnnotation:animated:

- (void) selectAnnotation: |  | (id< MAAnnotation >) | annotation
animated: |  | (BOOL) | animated

选中标注数据对应的view。注意：如果annotation对应的annotationView因不在屏幕范围内而被移入复用池，为了完成选中操作，会将对应的annotationView添加到地图上，并将地图中心点移至annotation.coordinate的位置。 Select the view corresponding to the annotation data. Note: If the annotationView corresponding to the annotation is moved into the reuse pool because it is not within the screen range,To complete the selection operation, the corresponding annotationView will be added to the map, and the center point of the map will be moved to the position of annotation.coordinate.

Parameters

  annotation | 标注数据 Annotation data
  animated | 是否有动画效果 Whether there is an animation effect

Provided by category MAMapView(Annotation).

## ◆ setBundlePath:

+ (NSInteger) setBundlePath: |  | (NSString *) | path |

设置地图资源路径

Note
  在初始化地图前使用
  - Parameter path: Amap.bundle的路径
  - Returns: 返回值 0:成功 1:版本号校验失败 2 路径不存在

Since
  10.5.0

Provided by category MAMapView(Resource).

## ◆ setCameraDegree:animated:duration:

- (void) setCameraDegree: |  | (CGFloat) | cameraDegree
animated: |  | (BOOL) | animated
duration: |  | (CFTimeInterval) | duration

设置地图相机角度(范围为[0.f, 60.f]，但高于40度的角度需要在16级以上才能生效) Set map camera angle (range [0.f, 60.f], but angles above 40 degrees require level 16 or higher to take effect)

Parameters

  cameraDegree | 要设置的相机角度 Camera angle to set
  animated | 是否动画 Whether to animate
  duration | 动画时间 Animation duration

## ◆ setCenterCoordinate:animated:

- (void) setCenterCoordinate: |  | (CLLocationCoordinate2D) | coordinate
animated: |  | (BOOL) | animated

设置当前地图的中心点，改变该值时，地图的比例尺级别不会发生变化 Set the center point of the current map. When this value is changed, the scale level of the map will not change

Parameters

  coordinate | 要设置的中心点 The center point to set
  animated | 是否动画设置 Whether to animate the setting

## ◆ setCompassImage:

- (void) setCompassImage: |  | (UIImage *) | image |

设置指南针的图片 Set compass image

Parameters

  image | 新的指南针图片 New compass image

## ◆ setConstructingRoadEnable:

- (void) setConstructingRoadEnable: |  | (BOOL) | enabled |

设置在建道路图层是否显示。默认NO（since 7.7.0） Set whether the road under construction layer is displayed. Default NO（since 7.7.0）

Parameters

  enabled | 是否显示 Whether to display

## ◆ setCurrentLocation:

- (void) setCurrentLocation: |  | (CLLocationCoordinate2D) | location |

多语言设置经纬度 Multilingual setting of latitude and longitude

Parameters

  location | 位置 Location

Provided by category MAMapView(Overlay).

## ◆ setCustomMapStyleOptions:

- (void) setCustomMapStyleOptions: |  | (MAMapCustomStyleOptions *) | styleOptions |

自定义地图样式设置,可以支持分级样式配置，如控制不同级别显示不同的颜色(自7.0.0开始样式有更新，旧的样式文件不能继续使用，必须到官网重新导出新样式文件。 自6.6.0开始使用新版样式，旧版样式无法在新版接口setCustomMapStyleOptions:(MAMapCustomStyleOptions *)styleOptions中使用，请到官网(lbs.amap.com)更新新版样式文件.) Custom map style settings support hierarchical style configurations, such as controlling different levels to display different colors (since version 7.0.0, the style has been updated, and old style files can no longer be used. You must re-export the new style file from the official website.From version 6.6.0, the new style is in use. The old style cannot be used in the new interface setCustomMapStyleOptions:(MAMapCustomStyleOptions *)styleOptions. Please update the new style file on the official website (lbs.amap.com).)

Parameters

  styleOptions | 自定义样式options. since 6.6.0 Custom style options. since 6.6.0

Provided by category MAMapView(CustomMapStyle).

## ◆ setMapOptRecordState:

- (void) setMapOptRecordState: |  | (BOOL) | state |

## ◆ setMapStatus:animated:

- (void) setMapStatus: |  | (MAMapStatus *) | status
animated: |  | (BOOL) | animated

设置地图状态 Set map status

Parameters

  status | 要设置的地图状态 Map status to be set
  animated | 是否动画 Whether to animate

## ◆ setMapStatus:animated:duration:

- (void) setMapStatus: |  | (MAMapStatus *) | status
animated: |  | (BOOL) | animated
duration: |  | (CFTimeInterval) | duration

设置地图状态 Set map status

Parameters

  status | 要设置的地图状态 Map status to be set
  animated | 是否动画 Whether to animate
  duration | 动画时间，默认动画时间为0.35s Animation time, default animation time is 0.35s

## ◆ setRegion:animated:

- (void) setRegion: |  | (MACoordinateRegion) | region
animated: |  | (BOOL) | animated

设定当前地图的经纬度范围，该范围可能会被调整为适合地图窗口显示的范围 Set the latitude and longitude range of the current map, which may be adjusted to fit the map window

Parameters

  region | 要设定的经纬度范围 The latitude and longitude range to be set
  animated | 是否动画设置 Whether to set animation

## ◆ setRotationDegree:animated:duration:

- (void) setRotationDegree: |  | (CGFloat) | rotationDegree
animated: |  | (BOOL) | animated
duration: |  | (CFTimeInterval) | duration

设置地图旋转角度(逆时针为正向) Set the map rotation angle (counterclockwise is positive)

Parameters

  rotationDegree | 旋转角度, 如当前角度是0，720表示逆时针旋转2周，-720表示正时针旋转2周 Rotation angle, if the current angle is 0, 720 means rotating counterclockwise for 2 rounds, -720 means rotating clockwise for 2 rounds
  animated | 动画 Animation
  duration | 动画时间 Animation duration

## ◆ setUserTrackingMode:animated:

- (void) setUserTrackingMode: |  | (MAUserTrackingMode) | mode
animated: |  | (BOOL) | animated

设置定位用户位置的模式 Set the mode for locating the user's position

Parameters

  mode | 要设置的模式 the mode to be set
  animated | 是否动画设置 whether to animate the setting

Provided by category MAMapView(UserLocation).

## ◆ setVisibleMapRect:animated:

- (void) setVisibleMapRect: |  | (MAMapRect) | mapRect
animated: |  | (BOOL) | animated

设置可见区域 Set the visible region

Parameters

  mapRect | 要设定的可见区域 The visible region to be set
  animated | 是否动画设置 Whether to set animation

## ◆ setVisibleMapRect:edgePadding:animated:

- (void) setVisibleMapRect: |  | (MAMapRect) | mapRect
edgePadding: |  | (UIEdgeInsets) | insets
animated: |  | (BOOL) | animated

设置可见地图矩形区域 Set visible map rectangle area

Parameters

  insets | 边缘插入 edge insertion
  mapRect | 要显示的地图矩形区域 The map rectangle area to display
  animated | 是否动画效果 Whether to enable animation

## ◆ setVisibleMapRect:edgePadding:animated:duration:

- (void) setVisibleMapRect: |  | (MAMapRect) | mapRect
edgePadding: |  | (UIEdgeInsets) | insets
animated: |  | (BOOL) | animated
duration: |  | (CFTimeInterval) | duration

设置可见地图矩形区域 Set visible map rectangle area

Parameters

  insets | 边缘插入 edge insertion
  mapRect | 要显示的地图矩形区域 The map rectangle area to display
  animated | 是否动画效果 Whether to enable animation
  duration | 动画时长，单位秒 Animation duration in seconds

## ◆ setZoomLevel:animated:

- (void) setZoomLevel: |  | (CGFloat) | zoomLevel
animated: |  | (BOOL) | animated

设置缩放级别（默认3-19，有室内地图时为3-20） Set the zoom level (default 3-19, 3-20 when indoor maps are available)

Parameters

  zoomLevel | 要设置的缩放级别 The zoom level to be set
  animated | 是否动画设置 Whether to animate the setting

## ◆ setZoomLevel:atPivot:animated:

- (void) setZoomLevel: |  | (CGFloat) | zoomLevel
atPivot: |  | (CGPoint) | pivot
animated: |  | (BOOL) | animated

根据指定的枢纽点来缩放地图 Zoom the map based on the specified pivot point

Parameters

  zoomLevel | 缩放级别 Zoom level
  pivot | 枢纽点(基于地图view的坐标系) Pivot point (based on the map view coordinate system)
  animated | 是否动画 Whether to animate

## ◆ showAnnotations:animated:

- (void) showAnnotations: |  | (NSArray *) | annotations
animated: |  | (BOOL) | animated

设置地图使其可以显示数组中所有的annotation, 如果数组中只有一个则直接设置地图中心为annotation的位置。 Configure the map to display all annotations in the array. If there is only one annotation in the array, directly set the map center to the location of the annotation.

Parameters

  annotations | 需要显示的annotation Annotation to be displayed
  animated | 是否执行动画 Whether to execute the animation

Provided by category MAMapView(Annotation).

## ◆ showAnnotations:edgePadding:animated:

- (void) showAnnotations: |  | (NSArray *) | annotations
edgePadding: |  | (UIEdgeInsets) | insets
animated: |  | (BOOL) | animated

设置地图使其可以显示数组中所有的annotation, 如果数组中只有一个则直接设置地图中心为annotation的位置。 Configure the map to display all annotations in the array. If there is only one annotation in the array, directly set the map center to the location of the annotation.

Parameters

  annotations | 需要显示的annotation Annotation to be displayed
  insets | insets 嵌入边界 insets embedded boundary
  animated | 是否执行动画 Whether to execute the animation

Provided by category MAMapView(Annotation).

## ◆ showHiddenBuildingsWithOperationId:

- (void) showHiddenBuildingsWithOperationId: |  | (NSInteger) | operationId |

显示建筑物 Display buildings

Parameters

  operationId | 操作Id（隐藏建筑物接口的返回值） Operation ID (return value of the hide buildings interface)

Provided by category MAMapView(Buildings).

## ◆ showOverlays:animated:

- (void) showOverlays: |  | (NSArray *) | overlays
animated: |  | (BOOL) | animated

设置地图使其可以显示数组中所有的overlay, 如果数组中只有一个则直接设置地图中心为overlay的位置。 Set the map to display all overlays in the array, if there is only one in the array, directly set the map center to the location of the overlay.

Parameters

  overlays | 需要显示的overlays Overlays to be displayed
  animated | 是否执行动画 whether to execute animation

Provided by category MAMapView(Overlay).

## ◆ showOverlays:edgePadding:animated:

- (void) showOverlays: |  | (NSArray *) | overlays
edgePadding: |  | (UIEdgeInsets) | insets
animated: |  | (BOOL) | animated

设置地图使其可以显示数组中所有的overlay, 如果数组中只有一个则直接设置地图中心为overlay的位置。 Set the map to display all overlays in the array, if there is only one in the array, directly set the map center to the location of the overlay.

Parameters

  overlays | 需要显示的overlays Overlays to be displayed
  insets | insets 嵌入边界 insets embedded boundaries
  animated | 是否执行动画 whether to execute animation

Provided by category MAMapView(Overlay).

## ◆ takeSnapshotInRect:

- (UIImage *) takeSnapshotInRect: |  | ((deprecated("Deprecated, please use the takeSnapshotInRect:withCompletionBlock: method since 6.0.0"))) | __attribute |

在指定区域内截图(默认会包含该区域内的annotationView),注意不要在地图回调方法内直接调用 Take screenshot in specified area (annotationView within the area will be included by default). Note: Do not call directly within map callback methods

Parameters

  rect | 指定的区域 Specified area

Returns
  截图image Screenshot image

## ◆ takeSnapshotInRect:timeoutInterval:completionBlock:

- (void) takeSnapshotInRect: |  | (CGRect) | rect
timeoutInterval: |  | (NSTimeInterval) | timeout
completionBlock: |  | (void(^)(UIImage *resultImage, NSInteger state)) | block

异步在指定区域内截图(默认会包含该区域内的annotationView), 地图载入完整时回调 (since 7.8.0) Asynchronously capture a screenshot within the specified area (by default includes the annotationView within the area), callback when the map is fully loaded (since 7.8.0)

Parameters

  rect | 指定的区域 Specified area
  timeout | 超时时间 timeout
  block | 回调block(resultImage:返回的图片,state：0载入不完整，1完整） Callback block(resultImage: returned image, state: 0 incomplete loading, 1 complete)

## ◆ takeSnapshotInRect:withCompletionBlock:

- (void) takeSnapshotInRect: |  | (CGRect) | rect
withCompletionBlock: |  | (void(^)(UIImage *resultImage, NSInteger state)) | block

异步在指定区域内截图(默认会包含该区域内的annotationView), 地图载入完整时回调 Asynchronously capture a screenshot within the specified area (by default includes the annotationView within that area), callback when the map is fully loaded

Parameters

  rect | 指定的区域 Specified area
  block | 回调block(resultImage:返回的图片,state：0载入不完整，1完整） Callback block(resultImage: returned image, state: 0 incomplete loading, 1 complete)

## ◆ terrainApprovalNumber

- (NSString *) terrainApprovalNumber |  |  |

获取地形图审图号。（since 8.2.0） Obtain topographic map approval number（since 8.2.0）

Returns
  地形图审图号 Topographic map approval number

## ◆ updatePrivacyAgree:

+ (void) updatePrivacyAgree: |  | (AMapPrivacyAgreeStatus) | agreeStatus |

更新用户授权高德SDK隐私协议状态. 注意：必须在MAMapView实例化之前调用 since 8.1.0 Updates the user's authorization status for the AMap SDK privacy agreement. Note: Must be called before the instantiation of MAMapView. since 8.1.0

Parameters

  agreeStatus | 用户授权高德SDK隐私协议状态 User authorization status of the AMap SDK privacy agreement

## ◆ updatePrivacyShow:privacyInfo:

+ (void) updatePrivacyShow: |  | (AMapPrivacyShowStatus) | showStatus
privacyInfo: |  | (AMapPrivacyInfoStatus) | containStatus

更新App是否显示隐私弹窗的状态，隐私弹窗是否包含高德SDK隐私协议内容的状态. 注意：必须在MAMapView实例化之前调用 since 8.1.0 Update the status of whether the app displays a privacy popup and whether the popup includes the content of the Amap SDK privacy agreement. Note: This must be called before the MAMapView is instantiated. since 8.1.0

Parameters

  showStatus | 隐私弹窗状态 Privacy pop-up status
  containStatus | 包含高德SDK隐私协议状态 includes the status of the AMap SDK privacy agreement

## ◆ updateUserLocationRepresentation:

- (void) updateUserLocationRepresentation: |  | (MAUserLocationRepresentation *) | representation |

设定UserLocationView样式。如果用户自定义了userlocation的annotationView，或者该annotationView还未添加到地图上，此方法将不起作用 Set the style of UserLocationView. If the user has customized the annotationView for userlocation, or if the annotationView has not been added to the map yet, this method will not work.

Parameters

  representation | 样式信息对象 the style information object

Provided by category MAMapView(UserLocation).

## ◆ viewForAnnotation:

- (MAAnnotationView *) viewForAnnotation: |  | (id< MAAnnotation >) | annotation |

根据标注数据获取标注view Get annotation view from annotation data

Parameters

  annotation | 标注数据 Annotation data

Returns
  对应的标注view Corresponding annotation view

Provided by category MAMapView(Annotation).

## Property Documentation

## ◆ allowsBackgroundLocationUpdates

- (BOOL) allowsBackgroundLocationUpdates
| read write nonatomic assign

是否允许后台定位。默认为NO。只在iOS 9.0之后起作用。
设置为YES的时候必须保证 Background Modes 中的 Location updates处于选中状态，否则会抛出异常。
注意：定位必须在停止的状态下设置（showsUserLocation = NO），否则无效 Whether to allow background location. Default is NO. Only works after iOS 9.0.
When set to YES, you must ensure that Location updates in Background Modes is selected, otherwise an exception will be thrown.
Note: The location must be set in a stopped state (showsUserLocation = NO), otherwise it will be invalid.

Provided by category MAMapView(UserLocation).

## ◆ annotations

- (NSArray*) annotations
| read nonatomic assign

所有添加的标注, 注意从5.3.0开始返回数组内不再包含定位蓝点userLocation All added annotations, note that from version 5.3.0 the returned array no longer includes the location blue dot userLocation

Provided by category MAMapView(Annotation).

## ◆ annotationVisibleRect

- (CGRect) annotationVisibleRect
| read nonatomic assign

annotation 可见区域 annotation visible area

Provided by category MAMapView(Annotation).

## ◆ cameraDegree

- (CGFloat) cameraDegree
| read write nonatomic assign

设置地图相机角度(范围为[0.f, 60.f]，但高于40度的角度需要在16级以上才能生效) Set the map camera angle (range is [0.f, 60.f], but angles above 40 degrees require level 16 or higher to take effect)

## ◆ centerCoordinate

- (CLLocationCoordinate2D) centerCoordinate
| read write nonatomic assign

当前地图的中心点，改变该值时，地图的比例尺级别不会发生变化 The center point of the current map; when this value is changed, the scale level of the map will not change.

## ◆ compassOrigin

- (CGPoint) compassOrigin
| read write nonatomic assign

指南针原点位置 compass origin position

## ◆ compassSize

- (CGSize) compassSize
| read nonatomic assign

指南针的宽高 Compass width and height

## ◆ customizeUserLocationAccuracyCircleRepresentation

- (BOOL) customizeUserLocationAccuracyCircleRepresentation
| read write nonatomic assign

是否自定义用户位置精度圈(userLocationAccuracyCircle)对应的 view, 默认为 NO.
如果为YES: 会调用 - (MAOverlayRenderer *)mapView (MAMapView *)mapView rendererForOverlay:(id <MAOverlay>)overlay 若返回nil, 则不加载.
如果为NO : 会使用默认的样式. Whether to customize the view corresponding to the user location accuracy circle (userLocationAccuracyCircle), default is NO.
If YES: it will call - (MAOverlayRenderer *)mapView (MAMapView *)mapView rendererForOverlay:(id <MAOverlay>)overlay, if it returns nil, it will not be loaded.
If NO: the default style will be used.

Provided by category MAMapView(UserLocation).

## ◆ customMapStyleEnabled

- (BOOL) customMapStyleEnabled
| read write nonatomic assign

是否开启自定义样式, 默认NO. since 5.0.0 Whether to enable custom style, default NO. since 5.0.0

Provided by category MAMapView(CustomMapStyle).

## ◆ delegate

- (id<MAMapViewDelegate>) delegate
| read write nonatomic weak

地图view的delegate Delegate of the map view

## ◆ desiredAccuracy

- (CLLocationAccuracy) desiredAccuracy
| read write nonatomic assign

设定定位精度。默认为kCLLocationAccuracyBest Set the positioning accuracy. The default is kCLLocationAccuracyBest

Provided by category MAMapView(UserLocation).

## ◆ distanceFilter

- (CLLocationDistance) distanceFilter
| read write nonatomic assign

设定定位的最小更新距离。默认为kCLDistanceFilterNone，会提示任何移动 Set the minimum update distance for positioning. The default is kCLDistanceFilterNone, which will prompt any movement

Provided by category MAMapView(UserLocation).

## ◆ drawingDisabled

- (BOOL) drawingDisabled
| read write nonatomic assign

是否强制关闭render，默认NO.地图元素完全不创建

## ◆ headingFilter

- (CLLocationDegrees) headingFilter
| read write nonatomic assign

设定最小更新角度。默认为1度，设定为kCLHeadingFilterNone会提示任何角度改变 Set the minimum update angle. The default is 1 degree, setting it to kCLHeadingFilterNone will prompt any angle change.

Provided by category MAMapView(UserLocation).

## ◆ isAbroad

- (BOOL) isAbroad
| read nonatomic assign

标识当前地图中心位置是否在中国范围外。此属性不是精确判断，不能用于边界区域 Indicates whether the current map center location is outside of China. This property is not an accurate judgment and should not be used for border areas.

## ◆ isAllowDecreaseFrame

- (BOOL) isAllowDecreaseFrame
| read write nonatomic assign

是否允许降帧，默认为YES Whether to allow frame rate reduction, default is YES

## ◆ limitMapRect

- (MAMapRect) limitMapRect
| read write nonatomic assign

设置可见地图区域的矩形边界，如限制地图只显示北京市范围 Set the rectangular boundaries of the visible map area, such as limiting the map to display only the Beijing area

## ◆ limitRegion

- (MACoordinateRegion) limitRegion
| read write nonatomic assign

设置可见地图区域的矩形边界，如限制地图只显示北京市范围 Set the rectangular boundaries of the visible map area, such as limiting the map to display only the Beijing area

## ◆ loadWorldVectorMap

- (BOOL) loadWorldVectorMap
| read write nonatomic assign

设置语言。中文:@0: 英文:@1. 英文使用注意事项：1、不能和自定义地图样式同时使用；2、英文状态只在MAMapTypeStandard生效 Set language. Chinese:@0: English:@1. Notes for English usage: 1. Cannot be used with custom map styles simultaneously; 2. English mode only takes effect in MAMapTypeStandard 语言类型 language type 是否显示国际图 Whether to display the international map

## ◆ logoCenter

- (CGPoint) logoCenter
| read write nonatomic assign

logo位置, 必须在mapView.bounds之内，否则会被忽略 Logo position, must be within mapView.bounds, otherwise it will be ignored

## ◆ logoEnable

- (BOOL) logoEnable
| read write nonatomic assign

是否显示logo，仅支持海外包设置，默认NO Whether to display the logo is only supported in overseas packages; the default is NO.

## ◆ logoLanguage

- (MALogoLanguage) logoLanguage
| read write nonatomic assign

设置logo语言。国内包: 支持中文与英文， 默认中文。海外包：仅支持英文，默认英文。 set logo language. Domestic package: supports Chinese and English, default Chinese; Overseas package: supports English only, default English.

## ◆ logoSize

- (CGSize) logoSize
| read nonatomic assign

logo的宽高 The width and height of the logo

## ◆ mapType

- (MAMapType) mapType
| read write nonatomic assign

地图类型。注意：自定义样式优先级高于mapType，如开启了自定义样式，要关闭自定义样式后mapType才生效 Map type. Note: Custom styles take precedence over mapType. If a custom style is enabled, mapType will only take effect after the custom style is turned off.

## ◆ maxRenderFrame

- (NSUInteger) maxRenderFrame
| read write nonatomic assign

最大帧数，有效的帧数为：60、30、20、10等能被60整除的数。默认为60 Maximum frame rate, valid frame rates are numbers divisible by 60 such as 60, 30, 20, 10. Default is 60

## ◆ maxZoomLevel

- (CGFloat) maxZoomLevel
| read write nonatomic assign

最大缩放级别（有室内地图时最大为20，否则为19） Maximum zoom level (20 when indoor maps are available, otherwise 19)

## ◆ metalEnabled

- (BOOL) metalEnabled
| read write nonatomic assign

标记是否开启metal，默认NO. 注意：因机型或系统限制(要求机型最低5S,系统最低iOS10)，开启metal可能失败。 Flag indicating whether to enable metal, default is NO. Note: Due to device or system limitations (minimum device requirement: 5S, minimum iOS version: iOS10), enabling metal may fail.

## ◆ metersPerPointForCurrentZoom

- (double) metersPerPointForCurrentZoom
| read nonatomic assign

在当前缩放级别下, 基于地图中心点, 1 screen point 对应的距离(单位是米) At the current zoom level, based on the map center point, the distance corresponding to 1 screen point (in meters)

## ◆ minZoomLevel

- (CGFloat) minZoomLevel
| read write nonatomic assign

最小缩放级别 Minimum zoom level

## ◆ overlays

- (NSArray*) overlays
| read nonatomic assign

所有添加的Overlay All added Overlays

Provided by category MAMapView(Overlay).

## ◆ pausesLocationUpdatesAutomatically

- (BOOL) pausesLocationUpdatesAutomatically
| read write nonatomic assign

指定定位是否会被系统自动暂停 Whether the specified positioning will be automatically paused by the system

Provided by category MAMapView(UserLocation).

## ◆ region

- (MACoordinateRegion) region
| read write nonatomic assign

当前地图的经纬度范围，设定的该范围可能会被调整为适合地图窗口显示的范围 The latitude and longitude range of the current map, the set range may be adjusted to fit the display window of the map

## ◆ renderringDisabled

- (BOOL) renderringDisabled
| read write nonatomic assign

停止/开启 地图绘制, 默认NO. Stop/Start map drawing, default NO

## ◆ rotateCameraEnabled

- (BOOL) rotateCameraEnabled
| read write nonatomic assign

是否支持camera旋转, 默认YES Whether camera rotation is supported, default YES

## ◆ rotateEnabled

- (BOOL) rotateEnabled
| read write nonatomic assign

是否支持旋转, 默认YES Whether rotation is supported, default YES

## ◆ rotationDegree

- (CGFloat) rotationDegree
| read write nonatomic assign

设置地图旋转角度(逆时针为正向) Set map rotation angle (counterclockwise is positive)

## ◆ runLoopMode

- (NSRunLoopMode) runLoopMode
| read write nonatomic copy

地图渲染的runloop mode，默认为NSRunLoopCommonModes。如果是和UIScrollView一起使用且不希望地图在scrollView拖动时渲染，请设置此值为NSDefaultRunLoopMode。（since 5.1.0） The runloop mode for map rendering, default is NSRunLoopCommonModes. If used with UIScrollView and you don't want the map to render during scrollView dragging, set this value to NSDefaultRunLoopMode.（since 5.1.0）

## ◆ scaleControlsUnit

- (MAScaleControlsUnit) scaleControlsUnit
| read write nonatomic assign

设置比例尺单位 Set the unit used by the scale control

Since
  11.1.200

## ◆ scaleOrigin

- (CGPoint) scaleOrigin
| read write nonatomic assign

比例尺原点位置 Scale bar origin position

## ◆ scaleSize

- (CGSize) scaleSize
| read nonatomic assign

比例尺的最大宽高 Maximum width and height of the scale bar

## ◆ screenAnchor

- (CGPoint) screenAnchor
| read write nonatomic assign

地图的视图锚点。坐标系归一化，(0, 0)为MAMapView左上角，(1, 1)为右下角。默认为(0.5, 0.5)，即当前地图的视图中心 （since 5.0.0） The anchor point of the map view. The coordinate system is normalized, (0, 0) is the top-left corner of MAMapView, (1, 1) is the bottom-right corner. Default is (0.5, 0.5), which is the center of the current map view.（since 5.0.0）

## ◆ scrollEnabled

- (BOOL) scrollEnabled
| read write nonatomic assign

是否支持平移, 默认YES Whether to support pan, default YES

## ◆ selectedAnnotations

- (NSArray*) selectedAnnotations
| read write nonatomic copy

处于选中状态的标注数据数据(其count == 0 或 1) Annotation data in selected state (where count == 0 or 1)

Provided by category MAMapView(Annotation).

## ◆ showPrivatePark

- (BOOL) showPrivatePark
| read write nonatomic assign

是否显示私有园区,仅限具有私有园区数据的客户使用

Since
  10.0.520

Provided by category MAMapView(AMLPark).

## ◆ showsBuildings

- (BOOL) showsBuildings
| read write nonatomic assign

是否显示楼块，默认为YES Whether to show building blocks, default YES

## ◆ showsCompass

- (BOOL) showsCompass
| read write nonatomic assign

是否显示指南针, 默认YES whether to display the compass, default is YES

## ◆ showsLabels

- (BOOL) showsLabels
| read write nonatomic assign

是否显示底图标注, 默认为YES Whether to show basemap labels, default YES

## ◆ showsScale

- (BOOL) showsScale
| read write nonatomic assign

是否显示比例尺, 默认YES Whether to display the scale bar, default is YES

## ◆ showsUserLocation

- (BOOL) showsUserLocation
| read write nonatomic assign

是否显示用户位置 Whether to display user location

Provided by category MAMapView(UserLocation).

## ◆ showTraffic

- (BOOL) showTraffic
| read write nonatomic assign

是否显示交通路况图层, 默认为NO Whether to display the traffic layer, default is NO

## ◆ terrainAuth

- (BOOL) terrainAuth
| read nonatomic assign

是否有地形图授权，默认YES. 如果没有授权会回调MAMapViewDelegate的 - (void)mapView:(MAMapView *)mapView didFailLoadTerrainWithError:(NSError *)error 方法 （since 9.3.1） Whether there is terrain map authorization, default is YES. If there is no authorization, the - (void)mapView:(MAMapView *)mapView didFailLoadTerrainWithError:(NSError *)error method of MAMapViewDelegate will be called back. （since 9.3.1）

## ◆ terrainEnabled

- (BOOL) terrainEnabled
| read write nonatomic assign

是否打开地形图，默认NO. 注意：需在地图创建前设置 （since 8.2.0） Whether to enable the terrain map, default is NO. Note: It needs to be set before the map is created.（since 8.2.0）

## ◆ tileLoadCallback

- (MATileLoadCallback) tileLoadCallback
| read write nonatomic copy

## ◆ touchPOIEnabled

- (BOOL) touchPOIEnabled
| read write nonatomic assign

是否支持单击地图获取POI信息(默认为YES), 对应的回调是 -(void)mapView:(MAMapView *) didTouchPois:(NSArray *) Is it possible to click on the map to get POI information (default is YES), the corresponding callback is -(void)mapView:(MAMapView *) didTouchPois:(NSArray *)

## ◆ userLocation

- (MAUserLocation*) userLocation
| read nonatomic assign

当前的位置数据 Current location data

Provided by category MAMapView(UserLocation).

## ◆ userLocationAccuracyCircle

- (MACircle*) userLocationAccuracyCircle
| read nonatomic assign

用户位置精度圈 对应的overlay Overlay corresponding to user location accuracy circle

Provided by category MAMapView(UserLocation).

## ◆ userLocationVisible

- (BOOL) userLocationVisible
| read nonatomic assign

当前位置在地图中是否可见 Whether the current location is visible on the map

Provided by category MAMapView(UserLocation).

## ◆ userTrackingMode

- (MAUserTrackingMode) userTrackingMode
| read write nonatomic assign

定位用户位置的模式, 注意：在follow模式下，设置地图中心点、设置可见区域、滑动手势、选择annotation操作会取消follow模式，并触发 - (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated; User location tracking mode, Note: In follow mode, setting the map center point, setting the visible region, swipe gestures, or selecting an annotation will cancel follow mode and trigger - (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated;

Provided by category MAMapView(UserLocation).

## ◆ visibleMapRect

- (MAMapRect) visibleMapRect
| read write nonatomic assign

可见区域, 设定的该范围可能会被调整为适合地图窗口显示的范围 Visible area, the set range may be adjusted to fit the map window display

## ◆ zoomEnabled

- (BOOL) zoomEnabled
| read write nonatomic assign

是否支持缩放, 默认YES Whether to support zoom, default YES

## ◆ zoomingInPivotsAroundAnchorPoint

- (BOOL) zoomingInPivotsAroundAnchorPoint
| read write nonatomic assign

是否以screenAnchor点作为锚点进行缩放，默认为YES。如果为NO，则以手势中心点作为锚点 Whether to use the screenAnchor point as the anchor for scaling, default is YES. If NO, the gesture center point is used as the anchor.

## ◆ zoomLevel

- (CGFloat) zoomLevel
| read write nonatomic assign

缩放级别（默认3-19，有室内地图时为3-20） Zoom level (default 3-19, 3-20 when indoor maps are available)

The documentation for this class was generated from the following file:

- MAMapView.h

© 2017 高德信息技术有限公司 版权所有，保留所有权利。