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属性")));
223- (void)setVisibleMapRect:(
MAMapRect)mapRect animated:(BOOL)animated;
246- (void)setVisibleMapRect:(
MAMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
255- (void)setVisibleMapRect:(
MAMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated duration:(CFTimeInterval)duration;
262- (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated;
269- (void)setZoomLevel:(CGFloat)zoomLevel animated:(BOOL)animated;
277- (void)setZoomLevel:(CGFloat)zoomLevel atPivot:(CGPoint)pivot animated:(BOOL)animated;
285- (void)setRotationDegree:(CGFloat)rotationDegree animated:(BOOL)animated duration:(CFTimeInterval)duration;
293- (void)setCameraDegree:(CGFloat)cameraDegree animated:(BOOL)animated duration:(CFTimeInterval)duration;
307- (void)setMapStatus:(
MAMapStatus *)status animated:(BOOL)animated;
316 animated:(BOOL)animated
317 duration:(CFTimeInterval)duration;
323- (void)setCompassImage:(UIImage *)image;
330- (UIImage *)takeSnapshotInRect:(CGRect)rect __attribute((deprecated("已废弃,请使用takeSnapshotInRect:withCompletionBlock:方法 since 6.0.0")));
337- (void)takeSnapshotInRect:(CGRect)rect withCompletionBlock:(
void (^)(UIImage *resultImage, NSInteger state))block;
345- (void)takeSnapshotInRect:(CGRect)rect timeoutInterval:(NSTimeInterval)timeout completionBlock:(
void (^)(UIImage *resultImage, NSInteger state))block;
352- (double)metersPerPointForZoomLevel:(CGFloat)zoomLevel;
360- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view;
368- (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view;
429- (void)addAnimationWith:(CAKeyframeAnimation *)mapCenterAnimation
430 zoomAnimation:(CAKeyframeAnimation *)zoomAnimation
431 rotateAnimation:(CAKeyframeAnimation *)rotateAnimation
432 cameraDegreeAnimation:(CAKeyframeAnimation *)cameraDegreeAnimation;
443- (void)setConstructingRoadEnable:(BOOL)enabled;
445- (void)setMapOptRecordState:(BOOL)state;
446#pragma mark - Privacy 隐私合规
452+ (void)updatePrivacyShow:(AMapPrivacyShowStatus)showStatus privacyInfo:(AMapPrivacyInfoStatus)containStatus;
457+ (void)updatePrivacyAgree:(AMapPrivacyAgreeStatus)agreeStatus;
461@interface MAMapView (Annotation)
464@property (nonatomic, readonly) NSArray *annotations;
467@property (nonatomic, copy) NSArray *selectedAnnotations;
470@property (nonatomic, readonly) CGRect annotationVisibleRect;
476- (void)addAnnotation:(
id <MAAnnotation>)annotation;
482- (void)addAnnotations:(NSArray *)annotations;
488- (void)removeAnnotation:(
id <MAAnnotation>)annotation;
494- (void)removeAnnotations:(NSArray *)annotations;
501- (NSSet *)annotationsInMapRect:(
MAMapRect)mapRect;
515- (
MAAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
522- (void)selectAnnotation:(
id <MAAnnotation>)annotation animated:(BOOL)animated;
529- (void)deselectAnnotation:(
id <MAAnnotation>)annotation animated:(BOOL)animated;
536- (void)showAnnotations:(NSArray *)annotations animated:(BOOL)animated;
544- (void)showAnnotations:(NSArray *)annotations edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
549@interface MAMapView (UserLocation)
552@property (nonatomic) BOOL showsUserLocation;
558@property (nonatomic) BOOL customizeUserLocationAccuracyCircleRepresentation;
561@property (nonatomic, readonly)
MACircle *userLocationAccuracyCircle;
567@property (nonatomic, readonly, getter=isUserLocationVisible) BOOL userLocationVisible;
570@property (nonatomic) CLLocationDistance distanceFilter;
573@property (nonatomic) CLLocationAccuracy desiredAccuracy;
576@property (nonatomic) CLLocationDegrees headingFilter;
579@property (nonatomic) BOOL pausesLocationUpdatesAutomatically;
582@property (nonatomic) BOOL allowsBackgroundLocationUpdates;
599@interface MAMapView (Overlay)
602@property (nonatomic, readonly) NSArray *overlays;
616- (void)addOverlay:(
id <MAOverlay>)overlay;
623- (void)addOverlays:(NSArray *)overlays;
630- (void)addOverlay:(
id <MAOverlay>)overlay level:(
MAOverlayLevel)level;
637- (void)addOverlays:(NSArray *)overlays level:(
MAOverlayLevel)level;
643- (void)removeOverlay:(
id <MAOverlay>)overlay;
649- (void)removeOverlays:(NSArray *)overlays;
660- (void)insertOverlay:(
id <MAOverlay>)overlay atIndex:(NSUInteger)index level:(
MAOverlayLevel)level;
667- (void)insertOverlay:(
id <MAOverlay>)overlay aboveOverlay:(
id <MAOverlay>)sibling;
674- (void)insertOverlay:(
id <MAOverlay>)overlay belowOverlay:(
id <MAOverlay>)sibling;
681- (void)insertOverlay:(
id <MAOverlay>)overlay atIndex:(NSUInteger)index;
688- (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2;
696- (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2 atLevel:(
MAOverlayLevel)level;
703- (void)exchangeOverlay:(
id <MAOverlay>)overlay1 withOverlay:(
id <MAOverlay>)overlay2;
717- (void)showOverlays:(NSArray *)overlays animated:(BOOL)animated;
725- (void)showOverlays:(NSArray *)overlays edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
733- (NSArray*)getHittedPolylinesWith:(CLLocationCoordinate2D)tappedCoord traverseAll:(BOOL)traverseAll;
738@interface MAMapView (Indoor)
741@property (nonatomic, getter = isShowsIndoorMap) BOOL showsIndoorMap;
744@property (nonatomic, getter = isShowsIndoorMapControl) BOOL showsIndoorMapControl;
747@property (nonatomic, readonly) CGSize indoorMapControlSize;
753- (void)setIndoorMapControlOrigin:(CGPoint)origin;
759- (void)setCurrentIndoorMapFloorIndex:(NSInteger)floorIndex;
764- (void)clearIndoorMapCache;
770@interface MAMapView (CustomMapStyle)
773@property (nonatomic, assign) BOOL customMapStyleEnabled;
784@interface MAMapView (Buildings)
792- (NSInteger)hideBuildingsWithPolygon:(CLLocationCoordinate2D *)polygon polygonSize:(NSUInteger)polygonSize;
798- (void)showHiddenBuildingsWithOperationId:(NSInteger)operationId;
801@interface MAMapView (EngineOverlay)
810@interface MAMapView (PoiFilter)
820- (void)removePoiFilter:(NSString *)keyName;
824- (void)clearPoiFilter;
827#pragma mark - MAMapViewDelegate
828@protocol MAMapViewDelegate <NSObject>
836- (void)mapViewRegionChanged:(
MAMapView *)mapView;
843- (void)mapView:(
MAMapView *)mapView regionWillChangeAnimated:(BOOL)animated;
850- (void)mapView:(
MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
858- (void)mapView:(
MAMapView *)mapView regionWillChangeAnimated:(BOOL)animated wasUserAction:(BOOL)wasUserAction;
866- (void)mapView:(
MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated wasUserAction:(BOOL)wasUserAction;
873- (void)mapView:(
MAMapView *)mapView mapWillMoveByUser:(BOOL)wasUserAction;
880- (void)mapView:(
MAMapView *)mapView mapDidMoveByUser:(BOOL)wasUserAction;
887- (void)mapView:(
MAMapView *)mapView mapWillZoomByUser:(BOOL)wasUserAction;
894- (void)mapView:(
MAMapView *)mapView mapDidZoomByUser:(BOOL)wasUserAction;
900- (void)mapViewWillStartLoadingMap:(
MAMapView *)mapView;
906- (void)mapViewDidFinishLoadingMap:(
MAMapView *)mapView;
913- (void)mapViewDidFailLoadingMap:(
MAMapView *)mapView withError:(NSError *)error;
920- (void)mapView:(
MAMapView *)mapView didFailLoadTerrainWithError:(NSError *)error;
944- (void)mapView:(
MAMapView *)mapView didAddAnnotationViews:(NSArray *)views;
964- (void)mapViewWillStartLocatingUser:(
MAMapView *)mapView;
970- (void)mapViewDidStopLocatingUser:(
MAMapView *)mapView;
978- (void)mapView:(
MAMapView *)mapView didUpdateUserLocation:(
MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation;
985- (void)mapViewRequireLocationAuth:(CLLocationManager *)locationManager;
992- (void)mapView:(
MAMapView *)mapView didFailToLocateUserWithError:(NSError *)error;
1017- (void)mapView:(
MAMapView *)mapView didAddOverlayRenderers:(NSArray *)overlayRenderers;
1025- (void)mapView:(
MAMapView *)mapView annotationView:(
MAAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control;
1054- (void)mapView:(
MAMapView *)mapView didChangeOpenGLESDisabled:(BOOL)openGLESDisabled __attribute((deprecated("已废弃,since 7.9.0")));
1061- (void)mapView:(
MAMapView *)mapView didTouchPois:(NSArray *)pois;
1068- (void)mapView:(
MAMapView *)mapView didSingleTappedAtCoordinate:(CLLocationCoordinate2D)coordinate;
1075- (void)mapView:(
MAMapView *)mapView didLongPressedAtCoordinate:(CLLocationCoordinate2D)coordinate;
1081- (void)mapInitComplete:(
MAMapView *)mapView;
1083#if MA_INCLUDE_INDOOR
1090- (void)mapView:(
MAMapView *)mapView didIndoorMapShowed:(MAIndoorInfo *)indoorInfo;
1098- (void)mapView:(
MAMapView *)mapView didIndoorMapFloorIndexChanged:(MAIndoorInfo *)indoorInfo;
1106- (void)mapView:(
MAMapView *)mapView didIndoorMapHidden:(MAIndoorInfo *)indoorInfo;
1113- (void)offlineDataWillReload:(
MAMapView *)mapView;
1119- (void)offlineDataDidReload:(
MAMapView *)mapView;
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
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
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 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