10#import <Foundation/Foundation.h>
11#import <UIKit/UIKit.h>
21#import <AMapFoundationKit/AMapServices.h>
82 MAALCLogLevelDebug = 1ULL << 3,
83 MAALCLogLevelInfo = 1ULL << 4,
84 MAALCLogLevelWarning = 1ULL << 5,
85 MAALCLogLevelError = 1ULL << 6,
86 MAALCLogLevelFatal = 1ULL << 7,
87 MAALCLogLevelPerformance = 1ULL << 8,
88 MAALCLogLevelTracing = 1ULL << 9,
89 MAALCLogLevelPrismTracing = 1ULL << 10,
90 MAALCLogLevelHeader = 1ULL << 11,
91 MAALCLogLevelAll = MAALCLogLevelDebug
93 | MAALCLogLevelWarning
96 | MAALCLogLevelPerformance
97 | MAALCLogLevelTracing
98 | MAALCLogLevelPrismTracing
99 | MAALCLogLevelHeader,
102#pragma mark - 动画相关的key Animation-related key
120@protocol MAMapViewDelegate;
138@property (nonatomic, weak) id<MAMapViewDelegate>
delegate;
210@property (nonatomic, assign, getter = isShowsLabels) BOOL
showsLabels;
222@property (nonatomic, copy) NSDictionary <NSNumber *, UIColor *> *trafficStatus
__attribute((deprecated(
"Deprecated since 7.8.0")));
298@property (nonatomic, assign) BOOL openGLESDisabled
__attribute((deprecated(
"Deprecated, since 7.9.0, please use the renderringDisabled property")));
329#if MA_INCLUDE_WORLD_EN_MAP
330@property (nonatomic, strong) NSNumber *mapLanguage;
350- (instancetype)initWithFrame:(CGRect)frame isNavi:(BOOL)isNavi;
358- (instancetype)initWithFrame:(CGRect)frame scaleFactor:(CGFloat)scaleFactor;
389- (void)setVisibleMapRect:(
MAMapRect)mapRect animated:(BOOL)animated;
423- (void)setVisibleMapRect:(
MAMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
437- (void)setVisibleMapRect:(
MAMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated duration:(CFTimeInterval)duration;
447- (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated;
457- (void)setZoomLevel:(CGFloat)zoomLevel animated:(BOOL)animated;
469- (void)setZoomLevel:(CGFloat)zoomLevel atPivot:(CGPoint)pivot animated:(BOOL)animated;
481- (void)setRotationDegree:(CGFloat)rotationDegree animated:(BOOL)animated duration:(CFTimeInterval)duration;
493- (void)setCameraDegree:(CGFloat)cameraDegree animated:(BOOL)animated duration:(CFTimeInterval)duration;
512- (void)setMapStatus:(
MAMapStatus *)status animated:(BOOL)animated;
525 animated:(BOOL)animated
526 duration:(CFTimeInterval)duration;
534- (void)setCompassImage:(UIImage *)image;
544- (UIImage *)takeSnapshotInRect:(CGRect)rect __attribute((deprecated("Deprecated, please use the takeSnapshotInRect:withCompletionBlock: method since 6.0.0")));
554- (void)takeSnapshotInRect:(CGRect)rect withCompletionBlock:(
void (^)(UIImage *resultImage, NSInteger state))block;
566- (void)takeSnapshotInRect:(CGRect)rect timeoutInterval:(NSTimeInterval)timeout completionBlock:(
void (^)(UIImage *resultImage, NSInteger state))block;
576- (double)metersPerPointForZoomLevel:(CGFloat)zoomLevel;
588- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view;
600- (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view;
685- (void)addAnimationWith:(CAKeyframeAnimation *)mapCenterAnimation
686 zoomAnimation:(CAKeyframeAnimation *)zoomAnimation
687 rotateAnimation:(CAKeyframeAnimation *)rotateAnimation
688 cameraDegreeAnimation:(CAKeyframeAnimation *)cameraDegreeAnimation;
702- (void)setConstructingRoadEnable:(BOOL)enabled;
704- (void)setMapOptRecordState:(BOOL)state;
706#pragma mark - ALC Log
715+ (void)setAlcLogConfig:(MAALCLogLevel)loglevelMask recordStorage:(BOOL)recordStorage;
717#pragma mark - Privacy 隐私合规 Privacy compliance
726+ (void)updatePrivacyShow:(AMapPrivacyShowStatus)showStatus privacyInfo:(AMapPrivacyInfoStatus)containStatus;
733+ (void)updatePrivacyAgree:(AMapPrivacyAgreeStatus)agreeStatus;
737@interface MAMapView (Annotation)
741@property (nonatomic, readonly) NSArray *annotations;
745@property (nonatomic, copy) NSArray *selectedAnnotations;
749@property (nonatomic, readonly) CGRect annotationVisibleRect;
757- (void)addAnnotation:(
id <MAAnnotation>)annotation;
765- (void)addAnnotations:(NSArray *)annotations;
773- (void)removeAnnotation:(
id <MAAnnotation>)annotation;
781- (void)removeAnnotations:(NSArray *)annotations;
791- (NSSet *)annotationsInMapRect:(
MAMapRect)mapRect;
811- (
MAAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
821- (void)selectAnnotation:(
id <MAAnnotation>)annotation animated:(BOOL)animated;
831- (void)deselectAnnotation:(
id <MAAnnotation>)annotation animated:(BOOL)animated;
841- (void)showAnnotations:(NSArray *)annotations animated:(BOOL)animated;
853- (void)showAnnotations:(NSArray *)annotations edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
858@interface MAMapView (UserLocation)
862@property (nonatomic) BOOL showsUserLocation;
870@property (nonatomic) BOOL customizeUserLocationAccuracyCircleRepresentation;
874@property (nonatomic, readonly)
MACircle *userLocationAccuracyCircle;
882@property (nonatomic, readonly, getter=isUserLocationVisible) BOOL userLocationVisible;
886@property (nonatomic) CLLocationDistance distanceFilter;
890@property (nonatomic) CLLocationAccuracy desiredAccuracy;
894@property (nonatomic) CLLocationDegrees headingFilter;
898@property (nonatomic) BOOL pausesLocationUpdatesAutomatically;
902@property (nonatomic) BOOL allowsBackgroundLocationUpdates;
924@interface MAMapView (Overlay)
928@property (nonatomic, readonly) NSArray *overlays;
948- (void)addOverlay:(
id <MAOverlay>)overlay;
958- (void)addOverlays:(NSArray *)overlays;
968- (void)addOverlay:(
id <MAOverlay>)overlay level:(
MAOverlayLevel)level;
978- (void)addOverlays:(NSArray *)overlays level:(
MAOverlayLevel)level;
986- (void)removeOverlay:(
id <MAOverlay>)overlay;
994- (void)removeOverlays:(NSArray *)overlays;
1010- (void)insertOverlay:(
id <MAOverlay>)overlay atIndex:(NSUInteger)index level:(
MAOverlayLevel)level;
1020- (void)insertOverlay:(
id <MAOverlay>)overlay aboveOverlay:(
id <MAOverlay>)sibling;
1030- (void)insertOverlay:(
id <MAOverlay>)overlay belowOverlay:(
id <MAOverlay>)sibling;
1040- (void)insertOverlay:(
id <MAOverlay>)overlay atIndex:(NSUInteger)index;
1050- (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2;
1062- (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2 atLevel:(
MAOverlayLevel)level;
1070- (void)exchangeOverlay:(
id <MAOverlay>)overlay1 withOverlay:(
id <MAOverlay>)overlay2;
1090- (void)showOverlays:(NSArray *)overlays animated:(BOOL)animated;
1102- (void)showOverlays:(NSArray *)overlays edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
1114- (NSArray*)getHittedPolylinesWith:(CLLocationCoordinate2D)tappedCoord traverseAll:(BOOL)traverseAll;
1122- (void)setCurrentLocation:(CLLocationCoordinate2D)location;
1125#if MA_INCLUDE_INDOOR
1126@interface MAMapView (Indoor)
1130@property (nonatomic, getter = isShowsIndoorMap) BOOL showsIndoorMap;
1134@property (nonatomic, getter = isShowsIndoorMapControl) BOOL showsIndoorMapControl;
1138@property (nonatomic, readonly) CGSize indoorMapControlSize;
1146- (void)setIndoorMapControlOrigin:(CGPoint)origin;
1154- (void)setCurrentIndoorMapFloorIndex:(NSInteger)floorIndex;
1160- (void)clearIndoorMapCache;
1167@interface MAMapView (CustomMapStyle)
1171@property (nonatomic, assign) BOOL customMapStyleEnabled;
1185@interface MAMapView (Buildings)
1197- (NSInteger)hideBuildingsWithPolygon:(CLLocationCoordinate2D *)polygon polygonSize:(NSUInteger)polygonSize;
1205- (void)showHiddenBuildingsWithOperationId:(NSInteger)operationId;
1208@interface MAMapView (EngineOverlay)
1219@interface MAMapView (PoiFilter)
1232- (void)removePoiFilter:(NSString *)keyName;
1237- (void)clearPoiFilter;
1240#pragma mark - MAMapViewDelegate
1241@protocol MAMapViewDelegate <NSObject>
1251- (void)mapViewRegionChanged:(
MAMapView *)mapView;
1261- (void)mapView:(
MAMapView *)mapView regionWillChangeAnimated:(BOOL)animated;
1271- (void)mapView:(
MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
1283- (void)mapView:(
MAMapView *)mapView regionWillChangeAnimated:(BOOL)animated wasUserAction:(BOOL)wasUserAction;
1295- (void)mapView:(
MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated wasUserAction:(BOOL)wasUserAction;
1305- (void)mapView:(
MAMapView *)mapView mapWillMoveByUser:(BOOL)wasUserAction;
1315- (void)mapView:(
MAMapView *)mapView mapDidMoveByUser:(BOOL)wasUserAction;
1325- (void)mapView:(
MAMapView *)mapView mapWillZoomByUser:(BOOL)wasUserAction;
1335- (void)mapView:(
MAMapView *)mapView mapDidZoomByUser:(BOOL)wasUserAction;
1343- (void)mapViewWillStartLoadingMap:(
MAMapView *)mapView;
1351- (void)mapViewDidFinishLoadingMap:(
MAMapView *)mapView;
1361- (void)mapViewDidFailLoadingMap:(
MAMapView *)mapView withError:(NSError *)error;
1371- (void)mapView:(
MAMapView *)mapView didFailLoadTerrainWithError:(NSError *)error;
1408- (void)mapView:(
MAMapView *)mapView didAddAnnotationViews:(NSArray *)views;
1436- (void)mapViewWillStartLocatingUser:(
MAMapView *)mapView;
1444- (void)mapViewDidStopLocatingUser:(
MAMapView *)mapView;
1456- (void)mapView:(
MAMapView *)mapView didUpdateUserLocation:(
MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation;
1465- (void)mapViewRequireLocationAuth:(CLLocationManager *)locationManager;
1475- (void)mapView:(
MAMapView *)mapView didFailToLocateUserWithError:(NSError *)error;
1511- (void)mapView:(
MAMapView *)mapView didAddOverlayRenderers:(NSArray *)overlayRenderers;
1523- (void)mapView:(
MAMapView *)mapView annotationView:(
MAAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control;
1564- (void)mapView:(
MAMapView *)mapView didChangeOpenGLESDisabled:(BOOL)openGLESDisabled __attribute((deprecated("Deprecated, since 7.9.0")));
1574- (void)mapView:(
MAMapView *)mapView didTouchPois:(NSArray *)pois;
1584- (void)mapView:(
MAMapView *)mapView didSingleTappedAtCoordinate:(CLLocationCoordinate2D)coordinate;
1594- (void)mapView:(
MAMapView *)mapView didLongPressedAtCoordinate:(CLLocationCoordinate2D)coordinate;
1602- (void)mapInitComplete:(
MAMapView *)mapView;
1604#if MA_INCLUDE_INDOOR
1614- (void)mapView:(
MAMapView *)mapView didIndoorMapShowed:(MAIndoorInfo *)indoorInfo;
1625- (void)mapView:(
MAMapView *)mapView didIndoorMapFloorIndexChanged:(MAIndoorInfo *)indoorInfo;
1635- (void)mapView:(
MAMapView *)mapView didIndoorMapHidden:(MAIndoorInfo *)indoorInfo;
1644- (void)offlineDataWillReload:(
MAMapView *)mapView;
1652- (void)offlineDataDidReload:(
MAMapView *)mapView;
1659- (void)customMapStyleAuthFailedWithErrorCode:(
int)errorCode message:(NSString *)msg;
MAAnnotationViewDragState
Definition MAAnnotationView.h:16
NSString *const kMAMapLayerCenterMapPointKey
NSString *const kMAMapLayerCameraDegreeKey
MAMapType
Definition MAMapView.h:28
@ MAMapTypeSatellite
卫星地图 Satellite Map
Definition MAMapView.h:30
@ MAMapTypeNaviNight
导航夜间视图 Navigation Night View
Definition MAMapView.h:34
@ MAMapTypeNavi
导航视图 Navigation View
Definition MAMapView.h:32
@ MAMapTypeStandardNight
夜间视图 Night View
Definition MAMapView.h:31
@ MAMapTypeStandard
普通地图 Standard Map
Definition MAMapView.h:29
@ MAMapTypeBus
公交视图 Transit View
Definition MAMapView.h:33
NSString *const kMAMapLayerZoomLevelKey
MALogoLanguage
Definition MAMapView.h:66
@ MALogoLanguageEnglish
Definition MAMapView.h:67
@ MALogoLanguageChinese
Definition MAMapView.h:68
typedef NS_OPTIONS(uint64_t, MAALCLogLevel)
Definition MAMapView.h:81
MATrafficStatus
Definition MAMapView.h:49
@ MATrafficStatusSmooth
1 通畅 Smooth
Definition MAMapView.h:50
@ MATrafficStatusSeriousJam
4 严重阻塞 Severely blocked
Definition MAMapView.h:53
@ MATrafficStatusSlow
2 缓行 Slow-moving
Definition MAMapView.h:51
@ MATrafficStatusJam
3 阻塞 Blocked
Definition MAMapView.h:52
@ MATrafficStatusExtremelySmooth
5 极度通畅 Extremely smooth
Definition MAMapView.h:54
MAOverlayLevel
Definition MAMapView.h:59
@ MAOverlayLevelAboveBuildings
在地图楼块之上、底图标注和兴趣点图标之下绘制overlay Draw overlay above map buildings and below map base annotations and POI...
Definition MAMapView.h:63
@ MAOverlayLevelBeforeBuildings
在地图楼块之下绘制overlay Draw overlay below map buildings
Definition MAMapView.h:62
@ MAOverlayLevelAboveRoads
在地图底图标注和兴趣点图标之下绘制overlay Draw overlay below map base annotations and POI icons
Definition MAMapView.h:60
@ MAOverlayLevelAboveLabels
在地图底图标注和兴趣点图标之上绘制overlay Draw overlay on top of map base annotations and POI icons
Definition MAMapView.h:61
NSString *const kMAMapLayerRotationDegreeKey
MAUserTrackingMode
Definition MAMapView.h:40
@ MAUserTrackingModeFollow
追踪用户的location更新 Track User's Location Updates
Definition MAMapView.h:42
@ MAUserTrackingModeNone
不追踪用户的location更新 Do Not Track User's Location Updates
Definition MAMapView.h:41
@ MAUserTrackingModeFollowWithHeading
追踪用户的location与heading更新 Track user's location and heading updates
Definition MAMapView.h:43
MAScaleControlsUnit
Definition MAMapView.h:74
@ MAScaleControlsUnitIMPERIAL
英制 IMPERIAL
Definition MAMapView.h:76
@ MAScaleControlsUnitMETRIC
公制 METRIC
Definition MAMapView.h:75
Definition MAAnnotationView.h:29
Definition MABaseEngineOverlay.h:14
Definition MAMapCustomStyleOptions.h:12
Definition MAMapStatus.h:18
Definition MAMapView.h:123
CLLocationCoordinate2D centerCoordinate
Definition MAMapView.h:146
id< MAMapViewDelegate > delegate
Definition MAMapView.h:138
BOOL showsLabels
Definition MAMapView.h:210
MALogoLanguage logoLanguage
Definition MAMapView.h:278
CGPoint screenAnchor
Definition MAMapView.h:310
NSUInteger maxRenderFrame
Definition MAMapView.h:290
BOOL terrainEnabled
Definition MAMapView.h:130
CGFloat rotationDegree
Definition MAMapView.h:178
NSString * terrainApprovalNumber()
获取地形图审图号。(since 8.2.0) Obtain topographic map approval number(since 8.2.0)
CGFloat logoSizeScale
Definition MAMapView.h:268
MAMapType mapType
Definition MAMapView.h:142
BOOL showsCompass
Definition MAMapView.h:230
MAMapRect visibleMapRect
Definition MAMapView.h:154
BOOL rotateEnabled
Definition MAMapView.h:198
MATileLoadCallback tileLoadCallback
Definition MAMapView.h:321
NSString * mapContentApprovalNumber()
获取地图审图号。如果启用了“自定义样式”功能(customMapStyleEnabled 为 YES),则返回nil。(since 5.4.0) Obtain the map approval numb...
void reloadInternalTexture()
重新加载内部纹理,在纹理被错误释放时可以执行此方法。(since 5.4.0) Reload internal textures, this method can be executed when te...
CGPoint compassOrigin
Definition MAMapView.h:234
MAMapStatus * getMapStatus()
获取地图状态 Get map status
BOOL showTraffic
Definition MAMapView.h:218
BOOL drawingDisabled
是否强制关闭render,默认NO.地图元素完全不创建
Definition MAMapView.h:306
double metersPerPointForCurrentZoom
Definition MAMapView.h:282
CGPoint scaleOrigin
Definition MAMapView.h:251
CGSize logoSize
Definition MAMapView.h:263
NSRunLoopMode runLoopMode
Definition MAMapView.h:325
CGSize compassSize
Definition MAMapView.h:238
MACoordinateRegion limitRegion
Definition MAMapView.h:158
BOOL zoomEnabled
Definition MAMapView.h:190
MAMapRect limitMapRect
Definition MAMapView.h:162
BOOL showsScale
Definition MAMapView.h:247
CGFloat maxZoomLevel
Definition MAMapView.h:174
MAScaleControlsUnit scaleControlsUnit
Definition MAMapView.h:243
BOOL isAbroad
Definition MAMapView.h:286
void forceRefresh()
强制刷新。(since 6.0.0) Force refresh
BOOL showsBuildings
Definition MAMapView.h:206
void reloadMap()
重新加载地图 Reload the map
BOOL showsLocalLanguage
Definition MAMapView.h:214
BOOL terrainAuth
Definition MAMapView.h:134
CGFloat cameraDegree
Definition MAMapView.h:182
CGFloat minZoomLevel
Definition MAMapView.h:170
CGPoint logoCenter
Definition MAMapView.h:259
MACoordinateRegion region
Definition MAMapView.h:150
BOOL isAllowDecreaseFrame
Definition MAMapView.h:294
CGFloat zoomLevel
Definition MAMapView.h:166
BOOL rotateCameraEnabled
Definition MAMapView.h:202
BOOL loadWorldVectorMap
Definition MAMapView.h:340
BOOL touchPOIEnabled
Definition MAMapView.h:226
CGSize scaleSize
Definition MAMapView.h:255
BOOL logoEnable
Definition MAMapView.h:272
BOOL metalEnabled
Definition MAMapView.h:126
void clearDisk()
清除所有磁盘上缓存的地图数据(不包括离线地图) Clear all cached map data on disk (excluding offline maps)
BOOL openGLESDisabled __attribute((deprecated("Deprecated, since 7.9.0, please use the renderringDisabled property")))
NSString * satelliteImageApprovalNumber()
获取卫星图片审图号。(since 5.4.0) Obtain satellite image approval number (since 5.4.0)
void(^ MATileLoadCallback)(BOOL success, int64_t durationMs, NSString *tileIdentifier)
瓦片加载回调
Definition MAMapView.h:319
NSDictionary< NSNumber *, UIColor * > *trafficStatus __attribute((deprecated("Deprecated since 7.8.0")))
BOOL renderringDisabled
Definition MAMapView.h:302
BOOL scrollEnabled
Definition MAMapView.h:194
BOOL zoomingInPivotsAroundAnchorPoint
Definition MAMapView.h:186
Definition MAOverlayRenderer.h:21
Definition MAPoiFilter.h:22
Definition MAUserLocation.h:19
Definition MAUserLocationRepresentation.h:18
Definition MAGeometry.h:35
Definition MAGeometry.h:56