高德地图SDK(导航)  V11.1.000
MAMapView Class Reference

#import <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 More...
 
(instancetype) - initWithFrame:scaleFactor:
 强制指定scaleFactor方式来初始化地图,原initWithFrame:方法自动根据系统scale初始化 More...
 
(void) - setRegion:animated:
 设定当前地图的经纬度范围,该范围可能会被调整为适合地图窗口显示的范围 Set the latitude and longitude range of the current map, which may be adjusted to fit the map window More...
 
(MACoordinateRegion- regionThatFits:
 根据当前地图视图frame的大小调整region范围 Adjust the region range according to the size of the current map view frame More...
 
(void) - setVisibleMapRect:animated:
 设置可见区域 Set the visible region More...
 
(MAMapRect- mapRectThatFits:
 重新计算可见地图矩形区域,使之匹配mapview长宽比 Recalculate the visible map rectangle area to match the mapview aspect ratio More...
 
(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 More...
 
(void) - setVisibleMapRect:edgePadding:animated:
 设置可见地图矩形区域 Set visible map rectangle area More...
 
(void) - setVisibleMapRect:edgePadding:animated:duration:
 设置可见地图矩形区域 Set visible map rectangle area More...
 
(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 More...
 
(void) - setZoomLevel:animated:
 设置缩放级别(默认3-19,有室内地图时为3-20) Set the zoom level (default 3-19, 3-20 when indoor maps are available) More...
 
(void) - setZoomLevel:atPivot:animated:
 根据指定的枢纽点来缩放地图 Zoom the map based on the specified pivot point More...
 
(void) - setRotationDegree:animated:duration:
 设置地图旋转角度(逆时针为正向) Set the map rotation angle (counterclockwise is positive) More...
 
(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) More...
 
(MAMapStatus *) - getMapStatus
 获取地图状态 Get map status More...
 
(void) - setMapStatus:animated:
 设置地图状态 Set map status More...
 
(void) - setMapStatus:animated:duration:
 设置地图状态 Set map status More...
 
(void) - setCompassImage:
 设置指南针的图片 Set compass image More...
 
(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 More...
 
(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 More...
 
(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) More...
 
(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) More...
 
(CGPoint) - convertCoordinate:toPointToView:
 将经纬度转换为指定view坐标系的坐标 Convert latitude and longitude to coordinates in the specified view coordinate system More...
 
(CLLocationCoordinate2D) - convertPoint:toCoordinateFromView:
 将指定view坐标系的坐标转换为经纬度 Convert coordinates in the specified view coordinate system to latitude and longitude More...
 
(CGRect) - convertRegion:toRectToView:
 将经纬度region转换为指定view坐标系的rect Convert latitude and longitude region to rect in the specified view coordinate system More...
 
(MACoordinateRegion- convertRect:toRegionFromView:
 将指定view坐标系的rect转换为经纬度region Convert the rect of the specified view coordinate system to a latitude and longitude region More...
 
(void) - reloadMap
 重新加载地图 Reload the map More...
 
(void) - clearDisk
 清除所有磁盘上缓存的地图数据(不包括离线地图) Clear all cached map data on disk (excluding offline maps) More...
 
(void) - reloadInternalTexture
 重新加载内部纹理,在纹理被错误释放时可以执行此方法。(since 5.4.0) Reload internal textures, this method can be executed when textures are incorrectly released.(since 5.4.0) More...
 
(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) More...
 
(NSString *) - satelliteImageApprovalNumber
 获取卫星图片审图号。(since 5.4.0) Obtain satellite image approval number (since 5.4.0) More...
 
(NSString *) - terrainApprovalNumber
 获取地形图审图号。(since 8.2.0) Obtain topographic map approval number(since 8.2.0) More...
 
(void) - addAnimationWith:zoomAnimation:rotateAnimation:cameraDegreeAnimation:
 添加CAKeyframeAnimation动画。(since 6.0.0) Add CAKeyframeAnimation(since 6.0.0) More...
 
(void) - forceRefresh
 强制刷新。(since 6.0.0) Force refresh More...
 
(void) - setConstructingRoadEnable:
 设置在建道路图层是否显示。默认NO(since 7.7.0) Set whether the road under construction layer is displayed. Default NO(since 7.7.0) More...
 
(void) - setMapOptRecordState:
 
(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 More...
 
(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 More...
 
(void) - removeAnnotation:
 移除标注 Remove annotation More...
 
(void) - removeAnnotations:
 移除一组标注 Remove a group of annotations More...
 
(NSSet *) - annotationsInMapRect:
 获取指定投影矩形范围内的标注 Get annotations within the specified projected rectangle More...
 
(MAAnnotationView *) - viewForAnnotation:
 根据标注数据获取标注view Get annotation view from annotation data More...
 
(MAAnnotationView *) - dequeueReusableAnnotationViewWithIdentifier:
 从复用内存池中获取制定复用标识的annotation view Retrieve annotation view with specified reuse identifier from reuse memory pool More...
 
(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. More...
 
(void) - deselectAnnotation:animated:
 取消选中标注数据对应的view Deselect the view corresponding to the annotation data More...
 
(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. More...
 
(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. More...
 
(NSInteger) - hideBuildingsWithPolygon:polygonSize:
 隐藏建筑物 Hide buildings More...
 
(void) - showHiddenBuildingsWithOperationId:
 显示建筑物 Display buildings More...
 
(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: (MAMapView(CustomMapStyle))styleOptions. Please update the new style file on the official website (lbs.amap.com).) More...
 
(void) - addEngineOverlay:
 向地图窗口添加Overlay。 Add Overlay to the map window More...
 
(void) - setIndoorMapControlOrigin:
 设置默认室内地图控件位置 Set the position of the default indoor map controls More...
 
(void) - setCurrentIndoorMapFloorIndex:
 设置当前室内地图楼层数 Set the current indoor map floor count More...
 
(void) - clearIndoorMapCache
 清空室内地图缓存 Clear indoor map cache More...
 
(NSArray *) - overlaysInLevel:
 取位于level下的overlays Get overlays under level More...
 
(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. More...
 
(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 More...
 
(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. More...
 
(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. More...
 
(void) - removeOverlay:
 移除Overlay Remove Overlay More...
 
(void) - removeOverlays:
 移除一组Overlay Remove a group of Overlays More...
 
(void) - insertOverlay:atIndex:level:
 在指定层级的指定的索引处添加一个Overlay Add an overlay at the specified index of the specified level More...
 
(void) - insertOverlay:aboveOverlay:
 在指定的Overlay之上插入一个overlay Insert an overlay above the specified overlay More...
 
(void) - insertOverlay:belowOverlay:
 在指定的Overlay之下插入一个overlay Insert an overlay below the specified overlay More...
 
(void) - insertOverlay:atIndex:
 在指定的索引处添加一个Overlay Add an Overlay at the specified index More...
 
(void) - exchangeOverlayAtIndex:withOverlayAtIndex:
 在MAOverlayLevelAboveLabels上交换指定索引处的Overlay swap the Overlay at the specified index on MAOverlayLevelAboveLabels More...
 
(void) - exchangeOverlayAtIndex:withOverlayAtIndex:atLevel:
 交换指定索引处的Overlay Swap Overlay at specified index More...
 
(void) - exchangeOverlay:withOverlay:
 交换两个overlay Swap two overlays More...
 
(MAOverlayRenderer *) - rendererForOverlay:
 查找指定overlay对应的Renderer,如果该View尚未创建,返回nil Find the Renderer corresponding to the specified overlay, returns nil if the View has not been created More...
 
(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. More...
 
(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. More...
 
(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 More...
 
(void) - setCurrentLocation:
 多语言设置经纬度 Multilingual setting of latitude and longitude More...
 
(void) - addPoiFilter:
 添加poi避让框 Add POI avoidance frame More...
 
(void) - removePoiFilter:
 移除poi避让框 Remove POI avoidance frame More...
 
(void) - clearPoiFilter
 清除poi避让框 Clear POI avoidance frame More...
 
(void) - setUserTrackingMode:animated:
 设置定位用户位置的模式 Set the mode for locating the user's position More...
 
(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. More...
 

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 More...
 
(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 More...
 
(NSInteger) + setBundlePath:
 

Properties

BOOL metalEnabled
 
BOOL terrainEnabled
 
BOOL terrainAuth
 
id< MAMapViewDelegatedelegate
 
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
 
BOOL showsScale
 
CGPoint scaleOrigin
 
CGSize scaleSize
 
CGPoint logoCenter
 
CGSize logoSize
 
double metersPerPointForCurrentZoom
 
BOOL isAbroad
 
NSUInteger maxRenderFrame
 
BOOL isAllowDecreaseFrame
 
BOOL renderringDisabled
 
CGPoint screenAnchor
 
NSRunLoopMode runLoopMode
 
NSNumber * mapLanguage
 
AMapRegionLanguageType regionLanguageType
 
BOOL loadWorldVectorMap
 
NSArray * annotations
 
NSArray * selectedAnnotations
 
CGRect annotationVisibleRect
 
BOOL customMapStyleEnabled
 
BOOL showsIndoorMap
 
BOOL showsIndoorMapControl
 
CGSize indoorMapControlSize
 
NSArray * overlays
 
BOOL showsUserLocation
 
MAUserLocationuserLocation
 
BOOL customizeUserLocationAccuracyCircleRepresentation
 
MACircleuserLocationAccuracyCircle
 
MAUserTrackingMode userTrackingMode
 
BOOL userLocationVisible
 
CLLocationDistance distanceFilter
 
CLLocationAccuracy desiredAccuracy
 
CLLocationDegrees headingFilter
 
BOOL pausesLocationUpdatesAutomatically
 
BOOL allowsBackgroundLocationUpdates
 

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)

◆ clearIndoorMapCache

- (void) clearIndoorMapCache

清空室内地图缓存 Clear indoor map cache

Provided by category MAMapView(Indoor).

◆ 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
overlay1overlay1
overlay2overlay2

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: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
levelSpecified 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

◆ setCurrentIndoorMapFloorIndex:

- (void) setCurrentIndoorMapFloorIndex: (NSInteger)  floorIndex

设置当前室内地图楼层数 Set the current indoor map floor count

Parameters
floorIndex要设置的楼层数 Number of floors to set

Provided by category MAMapView(Indoor).

◆ 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: (MAMapView(CustomMapStyle))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).

◆ setIndoorMapControlOrigin:

- (void) setIndoorMapControlOrigin: (CGPoint)  origin

设置默认室内地图控件位置 Set the position of the default indoor map controls

Parameters
origin左上角点位置 The position of the top-left corner point

Provided by category MAMapView(Indoor).

◆ 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
insetsinsets 嵌入边界 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
insetsinsets 嵌入边界 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
readwritenonatomicassign

是否允许后台定位。默认为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
readnonatomicassign

所有添加的标注, 注意从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
readnonatomicassign

annotation 可见区域 annotation visible area

Provided by category MAMapView(Annotation).

◆ cameraDegree

- (CGFloat) cameraDegree
readwritenonatomicassign

设置地图相机角度(范围为[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
readwritenonatomicassign

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

◆ compassOrigin

- (CGPoint) compassOrigin
readwritenonatomicassign

指南针原点位置 compass origin position

◆ compassSize

- (CGSize) compassSize
readnonatomicassign

指南针的宽高 Compass width and height

◆ customizeUserLocationAccuracyCircleRepresentation

- (BOOL) customizeUserLocationAccuracyCircleRepresentation
readwritenonatomicassign

是否自定义用户位置精度圈(userLocationAccuracyCircle)对应的 view, 默认为 NO.
如果为YES: 会调用 - (MAOverlayRenderer *)mapView (MAMapView *)mapView rendererForOverlay: (MAMapView(Overlay))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: (MAMapView(Overlay))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
readwritenonatomicassign

是否开启自定义样式, 默认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
readwritenonatomicweak

地图view的delegate Delegate of the map view

◆ desiredAccuracy

- (CLLocationAccuracy) desiredAccuracy
readwritenonatomicassign

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

Provided by category MAMapView(UserLocation).

◆ distanceFilter

- (CLLocationDistance) distanceFilter
readwritenonatomicassign

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

Provided by category MAMapView(UserLocation).

◆ headingFilter

- (CLLocationDegrees) headingFilter
readwritenonatomicassign

设定最小更新角度。默认为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).

◆ indoorMapControlSize

- (CGSize) indoorMapControlSize
readnonatomicassign

默认室内地图控件的最大宽高 The maximum width and height of the default indoor map controls

Provided by category MAMapView(Indoor).

◆ isAbroad

- (BOOL) isAbroad
readnonatomicassign

标识当前地图中心位置是否在中国范围外。此属性不是精确判断,不能用于边界区域 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
readwritenonatomicassign

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

◆ limitMapRect

- (MAMapRect) limitMapRect
readwritenonatomicassign

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

◆ limitRegion

- (MACoordinateRegion) limitRegion
readwritenonatomicassign

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

◆ loadWorldVectorMap

- (BOOL) loadWorldVectorMap
readwritenonatomicassign

是否显示国际图 Whether to display the international map

◆ logoCenter

- (CGPoint) logoCenter
readwritenonatomicassign

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

◆ logoSize

- (CGSize) logoSize
readnonatomicassign

logo的宽高 The width and height of the logo

◆ mapLanguage

- (NSNumber*) mapLanguage
readwritenonatomicstrong

设置语言。中文:@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

◆ mapType

- (MAMapType) mapType
readwritenonatomicassign

地图类型。注意:自定义样式优先级高于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
readwritenonatomicassign

最大帧数,有效的帧数为: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
readwritenonatomicassign

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

◆ metalEnabled

- (BOOL) metalEnabled
readwritenonatomicassign

标记是否开启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
readnonatomicassign

在当前缩放级别下, 基于地图中心点, 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
readwritenonatomicassign

最小缩放级别 Minimum zoom level

◆ overlays

- (NSArray*) overlays
readnonatomicassign

所有添加的Overlay All added Overlays

Provided by category MAMapView(Overlay).

◆ pausesLocationUpdatesAutomatically

- (BOOL) pausesLocationUpdatesAutomatically
readwritenonatomicassign

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

Provided by category MAMapView(UserLocation).

◆ region

- (MACoordinateRegion) region
readwritenonatomicassign

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

◆ regionLanguageType

- (AMapRegionLanguageType) regionLanguageType
readwritenonatomicassign

语言类型 language type

◆ renderringDisabled

- (BOOL) renderringDisabled
readwritenonatomicassign

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

◆ rotateCameraEnabled

- (BOOL) rotateCameraEnabled
readwritenonatomicassign

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

◆ rotateEnabled

- (BOOL) rotateEnabled
readwritenonatomicassign

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

◆ rotationDegree

- (CGFloat) rotationDegree
readwritenonatomicassign

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

◆ runLoopMode

- (NSRunLoopMode) runLoopMode
readwritenonatomiccopy

地图渲染的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)

◆ scaleOrigin

- (CGPoint) scaleOrigin
readwritenonatomicassign

比例尺原点位置 Scale bar origin position

◆ scaleSize

- (CGSize) scaleSize
readnonatomicassign

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

◆ screenAnchor

- (CGPoint) screenAnchor
readwritenonatomicassign

地图的视图锚点。坐标系归一化,(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
readwritenonatomicassign

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

◆ selectedAnnotations

- (NSArray*) selectedAnnotations
readwritenonatomiccopy

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

Provided by category MAMapView(Annotation).

◆ showsBuildings

- (BOOL) showsBuildings
readwritenonatomicassign

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

◆ showsCompass

- (BOOL) showsCompass
readwritenonatomicassign

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

◆ showsIndoorMap

- (BOOL) showsIndoorMap
readwritenonatomicassign

是否显示室内地图, 默认NO Whether to display indoor maps, default NO

Provided by category MAMapView(Indoor).

◆ showsIndoorMapControl

- (BOOL) showsIndoorMapControl
readwritenonatomicassign

是否显示室内地图默认控件, 默认YES Whether to display the default indoor map controls, default YES

Provided by category MAMapView(Indoor).

◆ showsLabels

- (BOOL) showsLabels
readwritenonatomicassign

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

◆ showsScale

- (BOOL) showsScale
readwritenonatomicassign

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

◆ showsUserLocation

- (BOOL) showsUserLocation
readwritenonatomicassign

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

Provided by category MAMapView(UserLocation).

◆ showTraffic

- (BOOL) showTraffic
readwritenonatomicassign

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

◆ terrainAuth

- (BOOL) terrainAuth
readnonatomicassign

是否有地形图授权,默认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
readwritenonatomicassign

是否打开地形图,默认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)

◆ touchPOIEnabled

- (BOOL) touchPOIEnabled
readwritenonatomicassign

是否支持单击地图获取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
readnonatomicassign

当前的位置数据 Current location data

Provided by category MAMapView(UserLocation).

◆ userLocationAccuracyCircle

- (MACircle*) userLocationAccuracyCircle
readnonatomicassign

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

Provided by category MAMapView(UserLocation).

◆ userLocationVisible

- (BOOL) userLocationVisible
readnonatomicassign

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

Provided by category MAMapView(UserLocation).

◆ userTrackingMode

- (MAUserTrackingMode) userTrackingMode
readwritenonatomicassign

定位用户位置的模式, 注意:在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
readwritenonatomicassign

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

◆ zoomEnabled

- (BOOL) zoomEnabled
readwritenonatomicassign

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

◆ zoomingInPivotsAroundAnchorPoint

- (BOOL) zoomingInPivotsAroundAnchorPoint
readwritenonatomicassign

是否以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
readwritenonatomicassign

缩放级别(默认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:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。