10 #import <Foundation/Foundation.h> 11 #import <UIKit/UIKit.h> 55 #pragma mark - 动画相关的key 69 @protocol MAMapViewDelegate;
74 @property (nonatomic, weak) id<MAMapViewDelegate>
delegate;
125 @property (nonatomic, getter = isSkyModelEnabled) BOOL skyModelEnable
__attribute((deprecated(
"已废弃 since 6.0.0")));
131 @property (nonatomic, assign, getter = isShowsLabels) BOOL
showsLabels;
137 @property (nonatomic, copy) NSDictionary <NSNumber *, UIColor *> *
trafficStatus;
140 @property (nonatomic, assign) CGFloat trafficRatio
__attribute((deprecated(
"已废弃 since 6.0.0, 不再支持修改实时交通线宽")));
215 - (void)setVisibleMapRect:(
MAMapRect)mapRect animated:(BOOL)animated;
238 - (void)setVisibleMapRect:(
MAMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
245 - (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated;
252 - (void)setZoomLevel:(CGFloat)zoomLevel animated:(BOOL)animated;
260 - (void)setZoomLevel:(CGFloat)zoomLevel atPivot:(CGPoint)pivot animated:(BOOL)animated;
268 - (void)setRotationDegree:(CGFloat)rotationDegree animated:(BOOL)animated duration:(CFTimeInterval)duration;
276 - (void)setCameraDegree:(CGFloat)cameraDegree animated:(BOOL)animated duration:(CFTimeInterval)duration;
290 - (void)setMapStatus:(
MAMapStatus *)status animated:(BOOL)animated;
299 animated:(BOOL)animated
300 duration:(CFTimeInterval)duration;
306 - (void)setCompassImage:(UIImage *)image;
313 - (UIImage *)takeSnapshotInRect:(CGRect)rect __attribute((deprecated("已废弃,请使用takeSnapshotInRect:withCompletionBlock:方法 since 6.0.0")));
320 - (void)takeSnapshotInRect:(CGRect)rect withCompletionBlock:(
void (^)(UIImage *resultImage, NSInteger state))block;
327 - (double)metersPerPointForZoomLevel:(CGFloat)zoomLevel;
335 - (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view;
343 - (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view;
398 - (void)addAnimationWith:(CAKeyframeAnimation *)mapCenterAnimation
399 zoomAnimation:(CAKeyframeAnimation *)zoomAnimation
400 rotateAnimation:(CAKeyframeAnimation *)rotateAnimation
401 cameraDegreeAnimation:(CAKeyframeAnimation *)cameraDegreeAnimation;
422 @property (nonatomic, assign) BOOL allowsAnnotationViewSorting
__attribute((deprecated(
"已废弃 since 5.3.0")));
428 - (void)addAnnotation:(
id <MAAnnotation>)annotation;
434 - (void)addAnnotations:(NSArray *)annotations;
440 - (void)removeAnnotation:(
id <MAAnnotation>)annotation;
446 - (void)removeAnnotations:(NSArray *)annotations;
453 - (NSSet *)annotationsInMapRect:(
MAMapRect)mapRect;
467 - (
MAAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
474 - (void)selectAnnotation:(
id <MAAnnotation>)annotation animated:(BOOL)animated;
481 - (void)deselectAnnotation:(
id <MAAnnotation>)annotation animated:(BOOL)animated;
488 - (void)showAnnotations:(NSArray *)annotations animated:(BOOL)animated;
496 - (void)showAnnotations:(NSArray *)annotations edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
568 - (void)addOverlay:(
id <MAOverlay>)overlay;
575 - (void)addOverlays:(NSArray *)overlays;
582 - (void)addOverlay:(
id <MAOverlay>)overlay level:(
MAOverlayLevel)level;
589 - (void)addOverlays:(NSArray *)overlays level:(
MAOverlayLevel)level;
595 - (void)removeOverlay:(
id <MAOverlay>)overlay;
601 - (void)removeOverlays:(NSArray *)overlays;
612 - (void)insertOverlay:(
id <MAOverlay>)overlay atIndex:(NSUInteger)index level:(
MAOverlayLevel)level;
619 - (void)insertOverlay:(
id <MAOverlay>)overlay aboveOverlay:(
id <MAOverlay>)sibling;
626 - (void)insertOverlay:(
id <MAOverlay>)overlay belowOverlay:(
id <MAOverlay>)sibling;
633 - (void)insertOverlay:(
id <MAOverlay>)overlay atIndex:(NSUInteger)index;
640 - (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2;
648 - (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2 atLevel:(
MAOverlayLevel)level;
655 - (void)exchangeOverlay:(
id <MAOverlay>)overlay1 withOverlay:(
id <MAOverlay>)overlay2;
669 - (void)showOverlays:(NSArray *)overlays animated:(BOOL)animated;
677 - (void)showOverlays:(NSArray *)overlays edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
685 - (NSArray*)getHittedPolylinesWith:(CLLocationCoordinate2D)tappedCoord traverseAll:(BOOL)traverseAll;
689 #if MA_INCLUDE_INDOOR 705 - (void)setIndoorMapControlOrigin:(CGPoint)origin;
711 - (void)setCurrentIndoorMapFloorIndex:(NSInteger)floorIndex;
731 - (void)setCustomMapStyleWithWebData:(NSData *)data __attribute((deprecated("已废弃, 请使用 setCustomMapStyleOptions: since 6.6.0")));
737 - (void)setCustomTextureResourcePath:(NSString *)customTextureResourcePath __attribute((deprecated("已废弃, 请使用 setCustomMapStyleOptions: since 6.6.0")));
743 - (void)setCustomMapStyleID:(NSString *)customMapStyleID __attribute((deprecated("已废弃, 请使用 setCustomMapStyleOptions: since 6.6.0")));
753 #pragma mark - MAMapViewDelegate 754 @protocol MAMapViewDelegate <NSObject>
762 - (void)mapViewRegionChanged:(
MAMapView *)mapView;
769 - (void)mapView:(
MAMapView *)mapView regionWillChangeAnimated:(BOOL)animated;
776 - (void)mapView:(
MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
784 - (void)mapView:(
MAMapView *)mapView regionWillChangeAnimated:(BOOL)animated wasUserAction:(BOOL)wasUserAction;
792 - (void)mapView:(
MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated wasUserAction:(BOOL)wasUserAction;
799 - (void)mapView:(
MAMapView *)mapView mapWillMoveByUser:(BOOL)wasUserAction;
806 - (void)mapView:(
MAMapView *)mapView mapDidMoveByUser:(BOOL)wasUserAction;
813 - (void)mapView:(
MAMapView *)mapView mapWillZoomByUser:(BOOL)wasUserAction;
820 - (void)mapView:(
MAMapView *)mapView mapDidZoomByUser:(BOOL)wasUserAction;
826 - (void)mapViewWillStartLoadingMap:(
MAMapView *)mapView;
832 - (void)mapViewDidFinishLoadingMap:(
MAMapView *)mapView;
839 - (void)mapViewDidFailLoadingMap:(
MAMapView *)mapView withError:(NSError *)error;
863 - (void)mapView:(
MAMapView *)mapView didAddAnnotationViews:(NSArray *)views;
883 - (void)mapViewWillStartLocatingUser:(
MAMapView *)mapView;
889 - (void)mapViewDidStopLocatingUser:(
MAMapView *)mapView;
897 - (void)mapView:(
MAMapView *)mapView didUpdateUserLocation:(
MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation;
904 - (void)mapViewRequireLocationAuth:(CLLocationManager *)locationManager;
911 - (void)mapView:(
MAMapView *)mapView didFailToLocateUserWithError:(NSError *)error;
936 - (void)mapView:(
MAMapView *)mapView didAddOverlayRenderers:(NSArray *)overlayRenderers;
944 - (void)mapView:(
MAMapView *)mapView annotationView:(
MAAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control;
973 - (void)mapView:(
MAMapView *)mapView didChangeOpenGLESDisabled:(BOOL)openGLESDisabled;
980 - (void)mapView:(
MAMapView *)mapView didTouchPois:(NSArray *)pois;
987 - (void)mapView:(
MAMapView *)mapView didSingleTappedAtCoordinate:(CLLocationCoordinate2D)coordinate;
994 - (void)mapView:(
MAMapView *)mapView didLongPressedAtCoordinate:(CLLocationCoordinate2D)coordinate;
1000 - (void)mapInitComplete:(
MAMapView *)mapView;
1002 #if MA_INCLUDE_INDOOR 1026 #endif //end of MA_INCLUDE_INDOOR 1032 - (void)offlineDataWillReload:(
MAMapView *)mapView;
1038 - (void)offlineDataDidReload:(
MAMapView *)mapView;
MAMapRect limitMapRect
设置可见地图区域的矩形边界,如限制地图只显示北京市范围
Definition: MAMapView.h:92
Definition: MAMapView.h:690
NSString * mapContentApprovalNumber()
获取地图审图号。如果启用了“自定义样式”功能(customMapStyleEnabled 为 YES),则返回nil。(since 5...
Definition: MAMapCustomStyleOptions.h:11
CGPoint scaleOrigin
比例尺原点位置
Definition: MAMapView.h:158
NSArray * selectedAnnotations
处于选中状态的标注数据数据(其count == 0 或 1)
Definition: MAMapView.h:416
2 缓行
Definition: MAMapView.h:44
void reloadInternalTexture()
重新加载内部纹理,在纹理被错误释放时可以执行此方法。(since 5.4.0)
该类是地图覆盖物Renderer的基类, 提供绘制overlay的接口但并无实际的实现(render相关方法只能在重写后的gl...
Definition: MAOverlayRenderer.h:20
CGPoint logoCenter
logo位置, 必须在mapView.bounds之内,否则会被忽略
Definition: MAMapView.h:164
该类用于定义一个圆, 通常MACircle是MACircleView的model
Definition: MACircle.h:14
MATrafficStatus
交通拥堵状态
Definition: MAMapView.h:41
定位信息类
Definition: MAUserLocation.h:17
卫星地图
Definition: MAMapView.h:26
室内图信息
Definition: MAIndoorInfo.h:28
MAUserTrackingMode
用户跟踪模式
Definition: MAMapView.h:33
MACoordinateRegion region
当前地图的经纬度范围,设定的该范围可能会被调整为适合地图窗口显示的范围
Definition: MAMapView.h:83
MAUserLocation * userLocation
当前的位置数据
Definition: MAMapView.h:507
4 严重阻塞
Definition: MAMapView.h:46
BOOL customizeUserLocationAccuracyCircleRepresentation
是否自定义用户位置精度圈(userLocationAccuracyCircle)对应的 view, 默认为 NO. 如果为YES: 会调用 - (MAO...
Definition: MAMapView.h:510
CLLocationAccuracy desiredAccuracy
设定定位精度。默认为kCLLocationAccuracyBest
Definition: MAMapView.h:525
CGFloat maxZoomLevel
最大缩放级别(有室内地图时最大为20,否则为19)
Definition: MAMapView.h:101
中心点、跨度范围定义的四边形经纬度范围
Definition: MAGeometry.h:32
MAMapStatus * getMapStatus()
获取地图状态
BOOL showsIndoorMap
是否显示室内地图, 默认NO
Definition: MAMapView.h:693
NSString *const kMAMapLayerCameraDegreeKey
摄像机俯视角度, 范围[0, 45], 封装成NSNumber
CGFloat minZoomLevel
最小缩放级别
Definition: MAMapView.h:98
BOOL openGLESDisabled
停止/开启 OpenGLES绘制, 默认NO. 对应回调是 - (void)mapView:(MAMapView *) didChangeOpenGLESDisabled:(B...
Definition: MAMapView.h:182
double metersPerPointForCurrentZoom
在当前缩放级别下, 基于地图中心点, 1 screen point 对应的距离(单位是米)
Definition: MAMapView.h:170
BOOL isAllowDecreaseFrame
是否允许降帧,默认为YES
Definition: MAMapView.h:179
NSString *const kMAMapLayerRotationDegreeKey
旋转角度key, 范围[0, 360), 封装成NSNumber
MAMapType
地图类型
Definition: MAMapView.h:23
NSDictionary< NSNumber *, UIColor * > * trafficStatus
设置实时交通颜色,key为 MATrafficStatus
Definition: MAMapView.h:137
CLLocationDistance distanceFilter
设定定位的最小更新距离。默认为kCLDistanceFilterNone,会提示任何移动
Definition: MAMapView.h:522
NSArray * annotations
所有添加的标注, 注意从5.3.0开始返回数组内不再包含定位蓝点userLocation
Definition: MAMapView.h:413
追踪用户的location与heading更新
Definition: MAMapView.h:37
NSRunLoopMode runLoopMode
地图渲染的runloop mode,默认为NSRunLoopCommonModes。如果是和UIScrollView一起使用且不希望地图在scrollV...
Definition: MAMapView.h:188
MACircle * userLocationAccuracyCircle
用户位置精度圈 对应的overlay
Definition: MAMapView.h:513
BOOL rotateCameraEnabled
是否支持camera旋转, 默认YES
Definition: MAMapView.h:122
CLLocationCoordinate2D centerCoordinate
当前地图的中心点,改变该值时,地图的比例尺级别不会发生变化
Definition: MAMapView.h:80
NSUInteger maxRenderFrame
最大帧数,有效的帧数为:60、30、20、10等能被60整除的数。默认为60
Definition: MAMapView.h:176
BOOL showsLabels
是否显示底图标注, 默认为YES
Definition: MAMapView.h:131
CGPoint compassOrigin
指南针原点位置
Definition: MAMapView.h:149
BOOL showsScale
是否显示比例尺, 默认YES
Definition: MAMapView.h:155
void clearDisk()
清除所有磁盘上缓存的地图数据(不包括离线地图)
NSString * satelliteImageApprovalNumber()
获取卫星图片审图号。(since 5.4.0)
用户位置显示样式控制
Definition: MAUserLocationRepresentation.h:16
不追踪用户的location更新
Definition: MAMapView.h:35
BOOL allowsBackgroundLocationUpdates
是否允许后台定位。默认为NO。只在iOS 9.0之后起作用。 设置为YES的时候必须保证 Background Modes 中的 Lo...
Definition: MAMapView.h:534
自定义样式
Definition: MAMapView.h:722
CGSize logoSize
logo的宽高
Definition: MAMapView.h:167
在地图底图标注和兴趣点图标之下绘制overlay
Definition: MAMapView.h:51
1 通畅
Definition: MAMapView.h:43
NSNumber * mapLanguage
设置语言。中文:@0: 英文:@1. 英文使用注意事项:1、不能和自定义地图样式同时使用;2、英文状态只在MAMapTy...
Definition: MAMapView.h:194
MAOverlayLevel
绘制overlay的层级
Definition: MAMapView.h:50
BOOL isAbroad
标识当前地图中心位置是否在中国范围外。此属性不是精确判断,不能用于边界区域
Definition: MAMapView.h:173
NSString *const kMAMapLayerZoomLevelKey
缩放级别key, 范围[minZoomLevel, maxZoomLevel], 封装成NSNumber
CGFloat zoomLevel
缩放级别(默认3-19,有室内地图时为3-20)
Definition: MAMapView.h:95
MACoordinateRegion limitRegion
设置可见地图区域的矩形边界,如限制地图只显示北京市范围
Definition: MAMapView.h:89
BOOL rotateEnabled
是否支持旋转, 默认YES
Definition: MAMapView.h:119
CGFloat cameraDegree
设置地图相机角度(范围为[0.f, 60.f],但高于40度的角度需要在16级以上才能生效)
Definition: MAMapView.h:107
BOOL scrollEnabled
是否支持平移, 默认YES
Definition: MAMapView.h:116
NSArray * overlays
所有添加的Overlay
Definition: MAMapView.h:554
普通地图
Definition: MAMapView.h:25
BOOL showsUserLocation
是否显示用户位置
Definition: MAMapView.h:504
BOOL showsBuildings
是否显示楼块,默认为YES
Definition: MAMapView.h:128
CGFloat rotationDegree
设置地图旋转角度(逆时针为正向)
Definition: MAMapView.h:104
BOOL customMapStyleEnabled
是否开启自定义样式, 默认NO. since 5.0.0
Definition: MAMapView.h:725
NSString *const kMAMapLayerCenterMapPointKey
中心点(MAMapPoint)key, 封装成[NSValue valueWithMAMapPoint:]
MAUserTrackingMode userTrackingMode
定位用户位置的模式, 注意:在follow模式下,设置地图中心点、设置可见区域、滑动手势、选择annotation操作...
Definition: MAMapView.h:516
3 阻塞
Definition: MAMapView.h:45
CLLocationDegrees headingFilter
设定最小更新角度。默认为1度,设定为kCLHeadingFilterNone会提示任何角度改变
Definition: MAMapView.h:528
CGSize compassSize
指南针的宽高
Definition: MAMapView.h:152
MAAnnotationViewDragState
MAAnnotationView拖动状态
Definition: MAAnnotationView.h:14
BOOL touchPOIEnabled
是否支持单击地图获取POI信息(默认为YES), 对应的回调是 -(void)mapView:(MAMapView *) didTouchPois:(NSArr...
Definition: MAMapView.h:143
BOOL showsCompass
是否显示指南针, 默认YES
Definition: MAMapView.h:146
BOOL showTraffic
是否显示交通路况图层, 默认为NO
Definition: MAMapView.h:134
MAMapType mapType
地图类型
Definition: MAMapView.h:77
导航视图
Definition: MAMapView.h:28
BOOL pausesLocationUpdatesAutomatically
指定定位是否会被系统自动暂停
Definition: MAMapView.h:531
地图状态对象
Definition: MAMapStatus.h:16
NSNumber * showsWorldMap
是否显示海外地图,默认为. 注意:必须先在官网申请开通海外权限
Definition: MAMapView.h:191
公交视图
Definition: MAMapView.h:29
CGPoint screenAnchor
地图的视图锚点。坐标系归一化,(0, 0)为MAMapView左上角,(1, 1)为右下角。默认为(0.5, 0.5),即当前地图的视图中心 (since 5.0.0)
Definition: MAMapView.h:185
id< MAMapViewDelegate > delegate
地图view的delegate
Definition: MAMapView.h:74
标注view
Definition: MAAnnotationView.h:26
BOOL skyModelEnable __attribute((deprecated("已废弃 since 6.0.0")))
是否支持天空模式,默认为YES. 开启后,进入天空模式后,annotation重用可视范围会缩减 ...
BOOL userLocationVisible
当前位置再地图中是否可见
Definition: MAMapView.h:519
Definition: MAMapView.h:410
BOOL zoomingInPivotsAroundAnchorPoint
是否以screenAnchor点作为锚点进行缩放,默认为YES。如果为NO,则以手势中心点作为锚点 ...
Definition: MAMapView.h:110
追踪用户的location更新
Definition: MAMapView.h:36
平面投影矩形结构定义
Definition: MAGeometry.h:50
CGRect annotationVisibleRect
annotation 可见区域
Definition: MAMapView.h:419
夜间视图
Definition: MAMapView.h:27
MAMapRect visibleMapRect
可见区域, 设定的该范围可能会被调整为适合地图窗口显示的范围
Definition: MAMapView.h:86
void forceRefresh()
强制刷新。(since 6.0.0)
Definition: MAMapView.h:71
Definition: MAMapView.h:501
void clearIndoorMapCache()
清空室内地图缓存
BOOL showsIndoorMapControl
是否显示室内地图默认控件, 默认YES
Definition: MAMapView.h:696
BOOL zoomEnabled
是否支持缩放, 默认YES
Definition: MAMapView.h:113
在地图底图标注和兴趣点图标之上绘制overlay
Definition: MAMapView.h:52
Definition: MAMapView.h:551
CGSize scaleSize
比例尺的最大宽高
Definition: MAMapView.h:161
CGSize indoorMapControlSize
默认室内地图控件的最大宽高
Definition: MAMapView.h:699