9 #import "BMKAnnotation.h"
10 #import "BMKAnnotationView.h"
11 #import "BMKOverlayView.h"
12 #import "BMKMapStatus.h"
13 #import "BMKLocationViewDisplayParam.h"
14 #import "BMKHeatMap.h"
15 #import "BMKHexagonHeatMap.h"
16 #import "BMKBaseIndoorMapInfo.h"
17 #import "BMKCustomMapStyleOption.h"
18 #import "BMKMapGestureDelegate.h"
19 #import "BMKParticleEffectOption.h"
21 NS_ASSUME_NONNULL_BEGIN
23 @class CompassOverlay;
31 @property (nonatomic, copy, nullable) NSString *
text;
34 @property (nonatomic, assign) CLLocationCoordinate2D
pt;
37 @property (nonatomic, copy, nullable) NSString *
uid;
42 BMKUserTrackingModeNone = 0,
43 BMKUserTrackingModeHeading,
44 BMKUserTrackingModeFollow,
45 BMKUserTrackingModeFollowWithHeading,
46 } BMKUserTrackingMode;
50 BMKLogoPositionLeftBottom = 0,
51 BMKLogoPositionLeftTop,
52 BMKLogoPositionCenterBottom,
53 BMKLogoPositionCenterTop,
54 BMKLogoPositionRightBottom,
55 BMKLogoPositionRightTop,
60 BMKSwitchIndoorFloorSuccess = 0,
61 BMKSwitchIndoorFloorFailed,
62 BMKSwitchIndoorFloorNotFocused,
63 BMKSwitchIndoorFloorNotExist,
64 } BMKSwitchIndoorFloorError;
68 BMKRegionChangeReasonGesture = 0,
69 BMKRegionChangeReasonEvent,
70 BMKRegionChangeReasonAPIs,
71 } BMKRegionChangeReason;
74 kBMKMapLanguageTypeChinese = 0,
75 kBMKMapLanguageTypeEnglish
79 typedef enum : NSInteger {
80 BMKMapParticleEffectUnknow = -1,
81 BMKMapParticleEffectSnow = 0,
82 BMKMapParticleEffectRainStorm = 4,
83 BMKMapParticleEffectSmog = 5,
84 BMKMapParticleEffectSandStorm = 7,
85 BMKMapParticleEffectFireworks = 8,
86 BMKMapParticleEffectFlower = 9
87 } BMKMapParticleEffect;
93 kBMKPoiTagTypeEpidemic,
101 kBMKLayerSDKHexagonHeatMap,
102 kBMKLayerNewSDKDefaultOverlay
110 @property (nonatomic, weak, nullable) id<BMKMapViewDelegate> delegate;
113 @property (nonatomic, weak, nullable) id<BMKMapGestureDelegate> gestureDelegate;
116 @property (nonatomic, assign) BMKMapType mapType;
122 @property (nonatomic, assign) BMKMapLanguageType languageType;
126 @property (nonatomic, strong) UIColor *backgroundColor;
131 @property (nonatomic, strong) UIImage *backgroundImage;
140 @property (nonatomic, assign) CGPoint compassPosition;
143 @property (nonatomic, readonly) CGSize compassSize;
146 @property (nonatomic, assign) CLLocationCoordinate2D centerCoordinate;
151 @property (nonatomic, assign) NSInteger fontSizeLevel;
154 @property (nonatomic, assign)
float zoomLevel;
157 @property (nonatomic, assign)
float minZoomLevel;
160 @property (nonatomic, assign)
float maxZoomLevel;
163 @property (nonatomic, assign)
int rotation;
166 @property (nonatomic, assign)
int overlooking;
169 @property (nonatomic, assign)
int minOverlooking;
172 @property(nonatomic, getter = isBuildingsEnabled) BOOL buildingsEnabled;
175 @property(nonatomic, assign) BOOL showMapPoi;
178 @property(nonatomic, getter = isTrafficEnabled) BOOL trafficEnabled;
181 @property(nonatomic, getter = isBaiduHeatMapEnabled) BOOL baiduHeatMapEnabled;
184 @property(nonatomic) BOOL gesturesEnabled;
187 @property(nonatomic, getter = isZoomEnabled) BOOL zoomEnabled;
190 @property(nonatomic, getter = isZoomEnabledWithTap) BOOL zoomEnabledWithTap;
193 @property(nonatomic, getter = isScrollEnabled) BOOL scrollEnabled;
196 @property(nonatomic, getter = isOverlookEnabled) BOOL overlookEnabled;
199 @property(nonatomic, getter = isRotateEnabled) BOOL rotateEnabled;
202 @property(nonatomic, assign) BOOL forceTouchEnabled;
205 @property(nonatomic, assign) BOOL gestureZoomAnimationEnabled;
208 @property (nonatomic, assign) BOOL showMapScaleBar;
211 @property (nonatomic, assign) CGPoint mapScaleBarPosition;
214 @property (nonatomic, readonly) CGSize mapScaleBarSize;
217 @property (nonatomic, assign) BMKLogoPosition logoPosition;
225 @property (nonatomic, assign) UIEdgeInsets mapPadding;
228 @property (nonatomic, assign) BOOL updateTargetScreenPtWhenMapPaddingChanged;
234 @property(nonatomic, getter = isChangeWithTouchPointCenterEnabled) BOOL ChangeWithTouchPointCenterEnabled;
240 @property(nonatomic, getter = isChangeCenterWithDoubleTouchPointEnabled) BOOL ChangeCenterWithDoubleTouchPointEnabled;
245 + (void)customMapStyle:(NSString *)customMapStyleJsonFilePath __deprecated_msg("Please use - (
void)setCustomMapStyleEnable:(BOOL)enable");
249 + (void)enableCustomMapStyle:(BOOL)enable __deprecated_msg("Please use - (
void)setCustomMapStylePath:(NSString *)customMapStyleFilePath");
253 + (void)willBackGround __deprecated_msg("废弃方法(空实现),逻辑由地图SDK控制");
257 + (void)didForeGround __deprecated_msg("废弃方法(空实现),逻辑由地图SDK控制");
261 + (BOOL)setBaiduMapSDKMetalEnable:(BOOL)metalEnable;
265 + (BOOL)setBaiduMapSDKOverlayNewVersionEnable:(BOOL)newVersionEnable;
274 - (BOOL)setCustomTrafficColorForSmooth:(UIColor *)smooth
276 congestion:(UIColor *)congestion
277 severeCongestion:(UIColor *)severeCongestion;
280 - (void)viewWillAppear;
283 - (void)viewWillDisappear;
286 - (void)cleanCacheWithMapType:(BMKMapType)type;
289 - (void)mapForceRefresh;
310 - (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated;
316 - (nullable UIImage *)takeSnapshot;
322 - (nullable UIImage *)takeSnapshot:(CGRect)rect;
326 - (void)setCompassImage:(UIImage *)image;
331 - (void)setVisibleMapRect:(
BMKMapRect)mapRect animated:(BOOL)animate;
340 - (void)setVisibleMapRect:(
BMKMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animate;
346 - (void)fitVisibleMapRect:(
BMKMapRect)mapRect edgePadding:(UIEdgeInsets)insets withAnimated:(BOOL)animate;
358 - (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view;
364 - (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view;
382 - (CGRect)convertMapRect:(
BMKMapRect)mapRect toRectToView:(UIView *)view;
388 - (
BMKMapRect)convertRect:(CGRect)rect toMapRectFromView:(UIView *)view;
393 - (CGPoint)screenPointFromMapPoint3:(
BMKMapPoint3)mapPoint3;
398 - (CGPoint)glPointForMapPoint:(
BMKMapPoint)mapPoint;
404 - (CGPoint *)glPointsForMapPoints:(
BMKMapPoint *)mapPoints count:(NSUInteger)count;
409 - (void)setMapCenterToScreenPt:(CGPoint)ptInScreen;
428 - (void)setMapStatus:(
BMKMapStatus *)mapStatus withAnimation:(BOOL)bAnimation;
434 - (void)setMapStatus:(
BMKMapStatus *)mapStatus withAnimation:(BOOL)bAnimation withAnimationTime:(
int)ulDuration;
438 - (BOOL)isSurpportBaiduHeatMap;
443 - (
float *)getProjectionMatrix;
448 - (
float *)getViewMatrix;
457 - (void)setCustomMapStylePath:(NSString *)customMapStyleFilePath;
463 - (void)setCustomMapStylePath:(NSString *)customMapStyleFilePath mode:(
int)mode;
468 - (void)setCustomMapStyleEnable:(BOOL)enable;
483 preLoad:(
void (^ _Nullable)(NSString * _Nullable path))preLoad
484 success:(
void (^ _Nullable)(NSString * path))success
485 failure:(
void (^ _Nullable)(NSError * error, NSString * _Nullable path))failure;
493 @property (nonatomic, assign) BOOL baseIndoorMapEnabled;
496 @property (nonatomic, assign) BOOL showIndoorMapPoi;
502 - (BMKSwitchIndoorFloorError)switchBaseIndoorMapFloor:(NSString *)strFloor withID:(NSString *)strID;
513 @property (nonatomic, assign) BOOL showsUserLocation;
516 @property (nonatomic, assign) BMKUserTrackingMode userTrackingMode;
519 @property (nonatomic, readonly, getter = isUserLocationVisible) BOOL userLocationVisible;
533 @property (nonatomic, copy, readonly, nullable) NSArray<id <BMKAnnotation>> *annotations;
536 @property (nonatomic, assign) BOOL isSelectedAnnotationViewFront;
544 - (void)addAnnotations:(NSArray<
id <
BMKAnnotation>> *)annotations;
552 - (void)removeAnnotations:(NSArray<
id <
BMKAnnotation> > *)annotations;
562 - (nullable
BMKAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
567 - (void)selectAnnotation:(
id <
BMKAnnotation>)annotation animated:(BOOL)animated;
572 - (void)deselectAnnotation:(
id <
BMKAnnotation>)annotation animated:(BOOL)animated;
577 - (void)showAnnotations:(NSArray<
id <
BMKAnnotation>> *)annotations animated:(BOOL)animated;
585 - (void)showAnnotations:(NSArray<
id <
BMKAnnotation>> *)annotations padding:(UIEdgeInsets)padding animated:(BOOL)animated;
602 - (void)addOverlays:(NSArray<
id <
BMKOverlay>> *)overlays;
606 - (void)removeOverlay:(
id <
BMKOverlay>)overlay;
610 - (void)removeOverlays:(NSArray<
id <
BMKOverlay>> *)overlays;
615 - (void)insertOverlay:(
id <
BMKOverlay>)overlay atIndex:(NSUInteger)index;
620 - (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2;
633 @property (nonatomic, copy, readonly, nullable) NSArray<id <BMKOverlay>> *overlays;
654 - (void)removeHeatMap;
657 - (void)startHeatMapFrameAnimation;
660 - (void)stopHeatMapFrameAnimation;
663 - (void)setHeatMapFrameAnimationIndex:(NSInteger)index;
669 @property (nonatomic, assign) BOOL showHexagonHeatMap;
673 - (void)removeHexagonHeatMap;
679 @property (nonatomic, assign) BOOL showOperateLayer;
684 - (BOOL)switchLayerOrder:(BMKLayerType)layer otherLayer:(BMKLayerType)otherLayer;
687 @property (nonatomic, assign) BOOL showDEMLayer;
692 - (BOOL)switchOverlayLayerAndNavigationLayer:(BOOL)isSwitch;
699 - (BOOL)switchOverlayLayerAndPOILayer:(BOOL)isSwitch;
703 - (BOOL)getPoiTagEnable:(BMKPoiTagType)poiTagType;
708 - (void)setPoiTagEnable:(BOOL)enable poiTagType:(BMKPoiTagType)poiTagType;
718 - (BOOL)showParticleEffect:(BMKMapParticleEffect)effect;
725 - (void)closeParticleEffect:(BMKMapParticleEffect)effect;
742 - (void)mapViewDidFinishLoading:(
BMKMapView *)mapView;
747 - (void)mapViewDidRenderValidData:(
BMKMapView *)mapView withError:(NSError *)error;
751 - (void)mapViewDidFinishRendering:(
BMKMapView *)mapView;
761 - (void)mapView:(
BMKMapView *)mapView regionWillChangeAnimated:(BOOL)animated;
767 - (void)mapView:(
BMKMapView *)mapView regionWillChangeAnimated:(BOOL)animated reason:(BMKRegionChangeReason)reason;
772 - (void)mapView:(
BMKMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
778 - (void)mapView:(
BMKMapView *)mapView regionDidChangeAnimated:(BOOL)animated reason:(BMKRegionChangeReason)reason;
789 - (void)mapView:(
BMKMapView *)mapView didAddAnnotationViews:(NSArray *)views;
814 - (void)mapView:(
BMKMapView *)mapView annotationView:(
BMKAnnotationView *)view didChangeDragState:(BMKAnnotationViewDragState)newState
815 fromOldState:(BMKAnnotationViewDragState)oldState;
831 - (void)mapView:(
BMKMapView *)mapView didAddOverlayViews:(NSArray *)overlayViews;
847 - (void)mapView:(
BMKMapView *)mapView onClickedMapBlank:(CLLocationCoordinate2D)coordinate;
852 - (void)mapview:(
BMKMapView *)mapView onDoubleClick:(CLLocationCoordinate2D)coordinate;
857 - (void)mapview:(
BMKMapView *)mapView onLongClick:(CLLocationCoordinate2D)coordinate;
864 - (void)mapview:(
BMKMapView *)mapView onForceTouch:(CLLocationCoordinate2D)coordinate force:(CGFloat)force maximumPossibleForce:(CGFloat)maximumPossibleForce;
868 - (void)mapStatusDidChanged:(
BMKMapView *)mapView;
879 - (void)mapView:(
BMKMapView *)mapView didChangeUserTrackingMode:(BMKUserTrackingMode)mode;
882 NS_ASSUME_NONNULL_END