10#import <Foundation/Foundation.h>
11#import <UIKit/UIKit.h>
21#import <AMapFoundationKit/AMapServices.h>
60#pragma mark - 动画相关的key
74@protocol MAMapViewDelegate;
88@property (nonatomic, weak) id<MAMapViewDelegate>
delegate;
142@property (nonatomic, assign, getter = isShowsLabels) BOOL
showsLabels;
148@property (nonatomic, copy) NSDictionary <NSNumber *, UIColor *> *trafficStatus
__attribute((deprecated(
"已废弃 since 7.8.0")));
190@property (nonatomic, assign) BOOL openGLESDisabled
__attribute((deprecated(
"已废弃,since 7.9.0,请使用renderringDisabled属性")));
217- (instancetype)initWithFrame:(CGRect)frame isNavi:(BOOL)isNavi;
238- (void)setVisibleMapRect:(
MAMapRect)mapRect animated:(BOOL)animated;
261- (void)setVisibleMapRect:(
MAMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
270- (void)setVisibleMapRect:(
MAMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated duration:(CFTimeInterval)duration;
277- (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated;
284- (void)setZoomLevel:(CGFloat)zoomLevel animated:(BOOL)animated;
292- (void)setZoomLevel:(CGFloat)zoomLevel atPivot:(CGPoint)pivot animated:(BOOL)animated;
300- (void)setRotationDegree:(CGFloat)rotationDegree animated:(BOOL)animated duration:(CFTimeInterval)duration;
308- (void)setCameraDegree:(CGFloat)cameraDegree animated:(BOOL)animated duration:(CFTimeInterval)duration;
322- (void)setMapStatus:(
MAMapStatus *)status animated:(BOOL)animated;
331 animated:(BOOL)animated
332 duration:(CFTimeInterval)duration;
338- (void)setCompassImage:(UIImage *)image;
345- (UIImage *)takeSnapshotInRect:(CGRect)rect __attribute((deprecated("已废弃,请使用takeSnapshotInRect:withCompletionBlock:方法 since 6.0.0")));
352- (void)takeSnapshotInRect:(CGRect)rect withCompletionBlock:(
void (^)(UIImage *resultImage, NSInteger state))block;
360- (void)takeSnapshotInRect:(CGRect)rect timeoutInterval:(NSTimeInterval)timeout completionBlock:(
void (^)(UIImage *resultImage, NSInteger state))block;
367- (double)metersPerPointForZoomLevel:(CGFloat)zoomLevel;
375- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view;
383- (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view;
444- (void)addAnimationWith:(CAKeyframeAnimation *)mapCenterAnimation
445 zoomAnimation:(CAKeyframeAnimation *)zoomAnimation
446 rotateAnimation:(CAKeyframeAnimation *)rotateAnimation
447 cameraDegreeAnimation:(CAKeyframeAnimation *)cameraDegreeAnimation;
458- (void)setConstructingRoadEnable:(BOOL)enabled;
460- (void)setMapOptRecordState:(BOOL)state;
461#pragma mark - Privacy 隐私合规
467+ (void)updatePrivacyShow:(AMapPrivacyShowStatus)showStatus privacyInfo:(AMapPrivacyInfoStatus)containStatus;
472+ (void)updatePrivacyAgree:(AMapPrivacyAgreeStatus)agreeStatus;
476@interface MAMapView (Annotation)
479@property (nonatomic, readonly) NSArray *annotations;
482@property (nonatomic, copy) NSArray *selectedAnnotations;
485@property (nonatomic, readonly) CGRect annotationVisibleRect;
491- (void)addAnnotation:(
id <MAAnnotation>)annotation;
497- (void)addAnnotations:(NSArray *)annotations;
503- (void)removeAnnotation:(
id <MAAnnotation>)annotation;
509- (void)removeAnnotations:(NSArray *)annotations;
516- (NSSet *)annotationsInMapRect:(
MAMapRect)mapRect;
530- (
MAAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
537- (void)selectAnnotation:(
id <MAAnnotation>)annotation animated:(BOOL)animated;
544- (void)deselectAnnotation:(
id <MAAnnotation>)annotation animated:(BOOL)animated;
551- (void)showAnnotations:(NSArray *)annotations animated:(BOOL)animated;
559- (void)showAnnotations:(NSArray *)annotations edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
564@interface MAMapView (UserLocation)
567@property (nonatomic) BOOL showsUserLocation;
573@property (nonatomic) BOOL customizeUserLocationAccuracyCircleRepresentation;
576@property (nonatomic, readonly)
MACircle *userLocationAccuracyCircle;
582@property (nonatomic, readonly, getter=isUserLocationVisible) BOOL userLocationVisible;
585@property (nonatomic) CLLocationDistance distanceFilter;
588@property (nonatomic) CLLocationAccuracy desiredAccuracy;
591@property (nonatomic) CLLocationDegrees headingFilter;
594@property (nonatomic) BOOL pausesLocationUpdatesAutomatically;
597@property (nonatomic) BOOL allowsBackgroundLocationUpdates;
614@interface MAMapView (Overlay)
617@property (nonatomic, readonly) NSArray *overlays;
631- (void)addOverlay:(
id <MAOverlay>)overlay;
638- (void)addOverlays:(NSArray *)overlays;
645- (void)addOverlay:(
id <MAOverlay>)overlay level:(
MAOverlayLevel)level;
652- (void)addOverlays:(NSArray *)overlays level:(
MAOverlayLevel)level;
658- (void)removeOverlay:(
id <MAOverlay>)overlay;
664- (void)removeOverlays:(NSArray *)overlays;
675- (void)insertOverlay:(
id <MAOverlay>)overlay atIndex:(NSUInteger)index level:(
MAOverlayLevel)level;
682- (void)insertOverlay:(
id <MAOverlay>)overlay aboveOverlay:(
id <MAOverlay>)sibling;
689- (void)insertOverlay:(
id <MAOverlay>)overlay belowOverlay:(
id <MAOverlay>)sibling;
696- (void)insertOverlay:(
id <MAOverlay>)overlay atIndex:(NSUInteger)index;
703- (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2;
711- (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2 atLevel:(
MAOverlayLevel)level;
718- (void)exchangeOverlay:(
id <MAOverlay>)overlay1 withOverlay:(
id <MAOverlay>)overlay2;
732- (void)showOverlays:(NSArray *)overlays animated:(BOOL)animated;
740- (void)showOverlays:(NSArray *)overlays edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
748- (NSArray*)getHittedPolylinesWith:(CLLocationCoordinate2D)tappedCoord traverseAll:(BOOL)traverseAll;
754- (void)setCurrentLocation:(CLLocationCoordinate2D)location;
758@interface MAMapView (Indoor)
761@property (nonatomic, getter = isShowsIndoorMap) BOOL showsIndoorMap;
764@property (nonatomic, getter = isShowsIndoorMapControl) BOOL showsIndoorMapControl;
767@property (nonatomic, readonly) CGSize indoorMapControlSize;
773- (void)setIndoorMapControlOrigin:(CGPoint)origin;
779- (void)setCurrentIndoorMapFloorIndex:(NSInteger)floorIndex;
784- (void)clearIndoorMapCache;
790@interface MAMapView (CustomMapStyle)
793@property (nonatomic, assign) BOOL customMapStyleEnabled;
804@interface MAMapView (Buildings)
812- (NSInteger)hideBuildingsWithPolygon:(CLLocationCoordinate2D *)polygon polygonSize:(NSUInteger)polygonSize;
818- (void)showHiddenBuildingsWithOperationId:(NSInteger)operationId;
821@interface MAMapView (EngineOverlay)
830@interface MAMapView (PoiFilter)
840- (void)removePoiFilter:(NSString *)keyName;
844- (void)clearPoiFilter;
847#pragma mark - MAMapViewDelegate
848@protocol MAMapViewDelegate <NSObject>
856- (void)mapViewRegionChanged:(
MAMapView *)mapView;
863- (void)mapView:(
MAMapView *)mapView regionWillChangeAnimated:(BOOL)animated;
870- (void)mapView:(
MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
878- (void)mapView:(
MAMapView *)mapView regionWillChangeAnimated:(BOOL)animated wasUserAction:(BOOL)wasUserAction;
886- (void)mapView:(
MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated wasUserAction:(BOOL)wasUserAction;
893- (void)mapView:(
MAMapView *)mapView mapWillMoveByUser:(BOOL)wasUserAction;
900- (void)mapView:(
MAMapView *)mapView mapDidMoveByUser:(BOOL)wasUserAction;
907- (void)mapView:(
MAMapView *)mapView mapWillZoomByUser:(BOOL)wasUserAction;
914- (void)mapView:(
MAMapView *)mapView mapDidZoomByUser:(BOOL)wasUserAction;
920- (void)mapViewWillStartLoadingMap:(
MAMapView *)mapView;
926- (void)mapViewDidFinishLoadingMap:(
MAMapView *)mapView;
933- (void)mapViewDidFailLoadingMap:(
MAMapView *)mapView withError:(NSError *)error;
940- (void)mapView:(
MAMapView *)mapView didFailLoadTerrainWithError:(NSError *)error;
964- (void)mapView:(
MAMapView *)mapView didAddAnnotationViews:(NSArray *)views;
984- (void)mapViewWillStartLocatingUser:(
MAMapView *)mapView;
990- (void)mapViewDidStopLocatingUser:(
MAMapView *)mapView;
998- (void)mapView:(
MAMapView *)mapView didUpdateUserLocation:(
MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation;
1005- (void)mapViewRequireLocationAuth:(CLLocationManager *)locationManager;
1012- (void)mapView:(
MAMapView *)mapView didFailToLocateUserWithError:(NSError *)error;
1037- (void)mapView:(
MAMapView *)mapView didAddOverlayRenderers:(NSArray *)overlayRenderers;
1045- (void)mapView:(
MAMapView *)mapView annotationView:(
MAAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control;
1074- (void)mapView:(
MAMapView *)mapView didChangeOpenGLESDisabled:(BOOL)openGLESDisabled __attribute((deprecated("已废弃,since 7.9.0")));
1081- (void)mapView:(
MAMapView *)mapView didTouchPois:(NSArray *)pois;
1088- (void)mapView:(
MAMapView *)mapView didSingleTappedAtCoordinate:(CLLocationCoordinate2D)coordinate;
1095- (void)mapView:(
MAMapView *)mapView didLongPressedAtCoordinate:(CLLocationCoordinate2D)coordinate;
1101- (void)mapInitComplete:(
MAMapView *)mapView;
1103#if MA_INCLUDE_INDOOR
1110- (void)mapView:(
MAMapView *)mapView didIndoorMapShowed:(MAIndoorInfo *)indoorInfo;
1118- (void)mapView:(
MAMapView *)mapView didIndoorMapFloorIndexChanged:(MAIndoorInfo *)indoorInfo;
1126- (void)mapView:(
MAMapView *)mapView didIndoorMapHidden:(MAIndoorInfo *)indoorInfo;
1133- (void)offlineDataWillReload:(
MAMapView *)mapView;
1139- (void)offlineDataDidReload:(
MAMapView *)mapView;
1146- (void)customMapStyleAuthFailedWithErrorCode:(
int)errorCode message:(NSString *)msg;
MAAnnotationViewDragState
Definition MAAnnotationView.h:15
NSString *const kMAMapLayerCenterMapPointKey
中心点(MAMapPoint)key, 封装成[NSValue valueWithMAMapPoint:]
NSString *const kMAMapLayerCameraDegreeKey
摄像机俯视角度, 范围[0, 45], 封装成NSNumber
MAMapType
Definition MAMapView.h:27
@ MAMapTypeSatellite
卫星地图
Definition MAMapView.h:29
@ MAMapTypeNaviNight
导航夜间视图
Definition MAMapView.h:33
@ MAMapTypeNavi
导航视图
Definition MAMapView.h:31
@ MAMapTypeStandardNight
夜间视图
Definition MAMapView.h:30
@ MAMapTypeStandard
普通地图
Definition MAMapView.h:28
@ MAMapTypeBus
公交视图
Definition MAMapView.h:32
NSString *const kMAMapLayerZoomLevelKey
缩放级别key, 范围[minZoomLevel, maxZoomLevel], 封装成NSNumber
MATrafficStatus
Definition MAMapView.h:46
@ MATrafficStatusSmooth
1 通畅
Definition MAMapView.h:47
@ MATrafficStatusSeriousJam
4 严重阻塞
Definition MAMapView.h:50
@ MATrafficStatusSlow
2 缓行
Definition MAMapView.h:48
@ MATrafficStatusJam
3 阻塞
Definition MAMapView.h:49
@ MATrafficStatusExtremelySmooth
5 极度通畅
Definition MAMapView.h:51
MAOverlayLevel
Definition MAMapView.h:55
@ MAOverlayLevelAboveRoads
在地图底图标注和兴趣点图标之下绘制overlay
Definition MAMapView.h:56
@ MAOverlayLevelAboveLabels
在地图底图标注和兴趣点图标之上绘制overlay
Definition MAMapView.h:57
NSString *const kMAMapLayerRotationDegreeKey
旋转角度key, 范围[0, 360), 封装成NSNumber
MAUserTrackingMode
Definition MAMapView.h:38
@ MAUserTrackingModeFollow
追踪用户的location更新
Definition MAMapView.h:40
@ MAUserTrackingModeNone
不追踪用户的location更新
Definition MAMapView.h:39
@ MAUserTrackingModeFollowWithHeading
追踪用户的location与heading更新
Definition MAMapView.h:41
标注view
Definition MAAnnotationView.h:27
Definition MABaseEngineOverlay.h:14
该类用于定义一个圆, 通常MACircle是MACircleView的model
Definition MACircle.h:14
Definition MAMapCustomStyleOptions.h:12
地图状态对象
Definition MAMapStatus.h:17
Definition MAMapView.h:77
CLLocationCoordinate2D centerCoordinate
当前地图的中心点,改变该值时,地图的比例尺级别不会发生变化
Definition MAMapView.h:94
id< MAMapViewDelegate > delegate
地图view的delegate
Definition MAMapView.h:88
BOOL showsLabels
是否显示底图标注, 默认为YES
Definition MAMapView.h:142
CGPoint screenAnchor
地图的视图锚点。坐标系归一化,(0, 0)为MAMapView左上角,(1, 1)为右下角。默认为(0.5, 0.5),即当前地图的视图中心 (since 5.0....
Definition MAMapView.h:196
NSUInteger maxRenderFrame
最大帧数,有效的帧数为:60、30、20、10等能被60整除的数。默认为60
Definition MAMapView.h:184
BOOL terrainEnabled
是否打开地形图,默认NO. 注意:需在地图创建前设置 (since 8.2.0)
Definition MAMapView.h:82
CGFloat rotationDegree
设置地图旋转角度(逆时针为正向)
Definition MAMapView.h:118
NSString * terrainApprovalNumber()
获取地形图审图号。(since 8.2.0)
MAMapType mapType
地图类型。注意:自定义样式优先级高于mapType,如开启了自定义样式,要关闭自定义样式后mapType才生效
Definition MAMapView.h:91
BOOL showsCompass
是否显示指南针, 默认YES
Definition MAMapView.h:154
MAMapRect visibleMapRect
可见区域, 设定的该范围可能会被调整为适合地图窗口显示的范围
Definition MAMapView.h:100
int regionLanguageType
设置区域语言类型 0 中文简体 1 中文繁体-香港 2 中文繁体-台湾
Definition MAMapView.h:205
BOOL rotateEnabled
是否支持旋转, 默认YES
Definition MAMapView.h:133
NSString * mapContentApprovalNumber()
获取地图审图号。如果启用了“自定义样式”功能(customMapStyleEnabled 为 YES),则返回nil。(since 5.4.0)
void reloadInternalTexture()
重新加载内部纹理,在纹理被错误释放时可以执行此方法。(since 5.4.0)
CGPoint compassOrigin
指南针原点位置
Definition MAMapView.h:157
MAMapStatus * getMapStatus()
获取地图状态
BOOL showTraffic
是否显示交通路况图层, 默认为NO
Definition MAMapView.h:145
BOOL isGroupEnabled
控制多个MapView实例加载完成不会触发其它实例代理方法,默认是NO
Definition MAMapView.h:210
double metersPerPointForCurrentZoom
在当前缩放级别下, 基于地图中心点, 1 screen point 对应的距离(单位是米)
Definition MAMapView.h:178
BOOL openGLESDisabled __attribute((deprecated("已废弃,since 7.9.0,请使用renderringDisabled属性")))
停止/开启 OpenGLES绘制, 默认NO. 对应回调是 - (void)mapView:(MAMapView *) didChangeOpenGLESDisabled:(BOOL)
CGPoint scaleOrigin
比例尺原点位置
Definition MAMapView.h:166
CGSize logoSize
logo的宽高
Definition MAMapView.h:175
NSRunLoopMode runLoopMode
地图渲染的runloop mode,默认为NSRunLoopCommonModes。如果是和UIScrollView一起使用且不希望地图在scrollView拖动时渲染,请设置此值为NSDefaultR...
Definition MAMapView.h:199
CGSize compassSize
指南针的宽高
Definition MAMapView.h:160
MACoordinateRegion limitRegion
设置可见地图区域的矩形边界,如限制地图只显示北京市范围
Definition MAMapView.h:103
BOOL zoomEnabled
是否支持缩放, 默认YES
Definition MAMapView.h:127
MAMapRect limitMapRect
设置可见地图区域的矩形边界,如限制地图只显示北京市范围
Definition MAMapView.h:106
BOOL showsScale
是否显示比例尺, 默认YES
Definition MAMapView.h:163
NSDictionary< NSNumber *, UIColor * > *trafficStatus __attribute((deprecated("已废弃 since 7.8.0")))
设置实时交通颜色,key为 MATrafficStatus
NSNumber * mapLanguage
设置语言。中文:@0: 英文:@1. 英文使用注意事项:1、不能和自定义地图样式同时使用;2、英文状态只在MAMapTypeStandard生效
Definition MAMapView.h:202
CGFloat maxZoomLevel
最大缩放级别(有室内地图时最大为20,否则为19)
Definition MAMapView.h:115
BOOL isAbroad
标识当前地图中心位置是否在中国范围外。此属性不是精确判断,不能用于边界区域
Definition MAMapView.h:181
void forceRefresh()
强制刷新。(since 6.0.0)
BOOL showsBuildings
是否显示楼块,默认为YES
Definition MAMapView.h:139
BOOL terrainAuth
是否有地形图授权,默认YES. 如果没有授权会回调MAMapViewDelegate的 - (void)mapView:(MAMapView *)mapView didFailLoadTerrainWi...
Definition MAMapView.h:85
CGFloat cameraDegree
设置地图相机角度(范围为[0.f, 60.f],但高于40度的角度需要在16级以上才能生效)
Definition MAMapView.h:121
CGFloat minZoomLevel
最小缩放级别
Definition MAMapView.h:112
CGPoint logoCenter
logo位置, 必须在mapView.bounds之内,否则会被忽略
Definition MAMapView.h:172
MACoordinateRegion region
当前地图的经纬度范围,设定的该范围可能会被调整为适合地图窗口显示的范围
Definition MAMapView.h:97
BOOL isAllowDecreaseFrame
是否允许降帧,默认为YES
Definition MAMapView.h:187
CGFloat zoomLevel
缩放级别(默认3-19,有室内地图时为3-20)
Definition MAMapView.h:109
BOOL rotateCameraEnabled
是否支持camera旋转, 默认YES
Definition MAMapView.h:136
BOOL loadWorldVectorMap
是否显示国际图
Definition MAMapView.h:208
BOOL touchPOIEnabled
是否支持单击地图获取POI信息(默认为YES), 对应的回调是 -(void)mapView:(MAMapView *) didTouchPois:(NSArray *)
Definition MAMapView.h:151
CGSize scaleSize
比例尺的最大宽高
Definition MAMapView.h:169
BOOL metalEnabled
标记是否开启metal,默认NO. 注意:因机型或系统限制(要求机型最低5S,系统最低iOS10),开启metal可能失败。
Definition MAMapView.h:79
void clearDisk()
清除所有磁盘上缓存的地图数据(不包括离线地图)
NSString * satelliteImageApprovalNumber()
获取卫星图片审图号。(since 5.4.0)
BOOL renderringDisabled
停止/开启 地图绘制, 默认NO.
Definition MAMapView.h:193
BOOL scrollEnabled
是否支持平移, 默认YES
Definition MAMapView.h:130
BOOL zoomingInPivotsAroundAnchorPoint
是否以screenAnchor点作为锚点进行缩放,默认为YES。如果为NO,则以手势中心点作为锚点
Definition MAMapView.h:124
该类是地图覆盖物Renderer的基类, 提供绘制overlay的接口但并无实际的实现(render相关方法只能在重写后的glRender方法中使用)
Definition MAOverlayRenderer.h:20
Definition MAPoiFilter.h:22
定位信息类
Definition MAUserLocation.h:18
用户位置显示样式控制
Definition MAUserLocationRepresentation.h:17
中心点、跨度范围定义的四边形经纬度范围
Definition MAGeometry.h:32
平面投影矩形结构定义
Definition MAGeometry.h:50